diff --git a/dart/eigen_client/pubspec.yaml b/dart/eigen_client/pubspec.yaml index 78045326..3a3cd67e 100644 --- a/dart/eigen_client/pubspec.yaml +++ b/dart/eigen_client/pubspec.yaml @@ -21,7 +21,7 @@ environment: dependencies: dio: ^5.10.0 drift: ^2.35.3 - eigen_api: ^0.12.1 + eigen_api: ^0.12.2 json_annotation: ^4.12.0 web_socket_channel: ^3.0.3 diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index b93a6984..d5e31d21 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -49,7 +49,7 @@ dependencies: # Pre-1.0 that resolves to `>=0.1.0 <0.2.0`: the engine announces breakage in # the MINOR position, so 0.2.0 is the release that needs a deliberate bump # here. See https://eigeninteractive.com/docs/reference/compatibility. - eigen_api: ^0.12.1 + eigen_api: ^0.12.2 dio: ^5.10.0 dio_smart_retry: ^7.0.1 web: ^1.1.2 diff --git a/server/.changeset/revalidated-toolchains.md b/server/.changeset/revalidated-toolchains.md deleted file mode 100644 index 9e325ed3..00000000 --- a/server/.changeset/revalidated-toolchains.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@eigeninteractive/server": patch -"create-eigen-game": patch ---- - -Update jose and validate Google Pub/Sub private claims from the verified JWT payload without weakening runtime checks. Move server and scaffold compilation to TypeScript 7 with the repaired tsdown declaration generator, update Cloudflare tooling, and regenerate Worker types. - -Generated apps use Flutter 3.47.9 / Dart 3.13.7, including certificate-store security fixes and the workspace native-assets test fix. Keep scaffold dependencies and Biome configuration aligned with the platform's validated toolchain. diff --git a/server/clients/dart/CHANGELOG.md b/server/clients/dart/CHANGELOG.md index 8b11a020..bb96e408 100644 --- a/server/clients/dart/CHANGELOG.md +++ b/server/clients/dart/CHANGELOG.md @@ -2,7 +2,7 @@ This package is generated from the Eigen engine's OpenAPI specification and its version tracks [`@eigeninteractive/server`](https://www.npmjs.com/package/@eigeninteractive/server) -exactly: 0.12.1 here is 0.12.1 there. It has no changes of its own. +exactly: 0.12.2 here is 0.12.2 there. It has no changes of its own. See the engine's changelog: diff --git a/server/clients/dart/README.md b/server/clients/dart/README.md index 924b8196..7b5bc4d1 100644 --- a/server/clients/dart/README.md +++ b/server/clients/dart/README.md @@ -16,7 +16,7 @@ The server-authoritative game engine API. Client routes (`/api/engine/_*`) requi This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 0.12.1 +- API version: 0.12.2 - Generator version: 7.17.0 - Build package: org.openapitools.codegen.languages.DartDioClientCodegen diff --git a/server/clients/dart/pubspec.yaml b/server/clients/dart/pubspec.yaml index 9707814e..d65232b0 100644 --- a/server/clients/dart/pubspec.yaml +++ b/server/clients/dart/pubspec.yaml @@ -15,7 +15,7 @@ description: >- # `version:` is stamped by the generation script from @eigeninteractive/server's # package.json. The wire contract is the server's, so the client carries the # server's version. Do not edit it by hand. -version: 0.12.1 +version: 0.12.2 homepage: https://eigeninteractive.com repository: https://github.com/eigeninteractive/eigen-platform/tree/main/server/clients/dart issue_tracker: https://github.com/eigeninteractive/eigen-platform/issues diff --git a/server/packages/create-eigen-game/CHANGELOG.md b/server/packages/create-eigen-game/CHANGELOG.md index df16e02b..a013c112 100644 --- a/server/packages/create-eigen-game/CHANGELOG.md +++ b/server/packages/create-eigen-game/CHANGELOG.md @@ -1,5 +1,13 @@ # create-eigen-game +## 0.17.9 + +### Patch Changes + +- [#155](https://github.com/eigeninteractive/eigen-platform/pull/155) [`69cbaa2`](https://github.com/eigeninteractive/eigen-platform/commit/69cbaa255988dc139980c156b6c65ef17412bc77) Thanks [@seenu-k](https://github.com/seenu-k)! - Update jose and validate Google Pub/Sub private claims from the verified JWT payload without weakening runtime checks. Move server and scaffold compilation to TypeScript 7 with the repaired tsdown declaration generator, update Cloudflare tooling, and regenerate Worker types. + + Generated apps use Flutter 3.47.9 / Dart 3.13.7, including certificate-store security fixes and the workspace native-assets test fix. Keep scaffold dependencies and Biome configuration aligned with the platform's validated toolchain. + ## 0.17.8 ### Patch Changes diff --git a/server/packages/create-eigen-game/package.json b/server/packages/create-eigen-game/package.json index 688991a0..d4472885 100644 --- a/server/packages/create-eigen-game/package.json +++ b/server/packages/create-eigen-game/package.json @@ -1,6 +1,6 @@ { "name": "create-eigen-game", - "version": "0.17.8", + "version": "0.17.9", "license": "MIT", "description": "Scaffold an EigenInteractive game Worker and Flutter app without cloning the engine repositories.", "type": "module", diff --git a/server/packages/kernel/CHANGELOG.md b/server/packages/kernel/CHANGELOG.md index d877b5b1..6ac9822a 100644 --- a/server/packages/kernel/CHANGELOG.md +++ b/server/packages/kernel/CHANGELOG.md @@ -1,5 +1,12 @@ # @eigeninteractive/kernel +## 0.12.2 + +### Patch Changes + +- Updated dependencies []: + - @eigeninteractive/rules@0.12.2 + ## 0.12.1 ### Patch Changes diff --git a/server/packages/kernel/package.json b/server/packages/kernel/package.json index 9ed41d4a..f5f62dde 100644 --- a/server/packages/kernel/package.json +++ b/server/packages/kernel/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/kernel", - "version": "0.12.1", + "version": "0.12.2", "license": "MIT", "description": "The pure decision core of the EigenInteractive engine: given a game, state, roster and intent it returns a commit plan or a rejection. No I/O, no platform APIs.", "main": "./dist/index.js", diff --git a/server/packages/rules/CHANGELOG.md b/server/packages/rules/CHANGELOG.md index 9889ef62..35e04174 100644 --- a/server/packages/rules/CHANGELOG.md +++ b/server/packages/rules/CHANGELOG.md @@ -1,5 +1,9 @@ # @eigeninteractive/rules +## 0.12.2 + +No changes in this release. + ## 0.12.1 No changes in this release. diff --git a/server/packages/rules/package.json b/server/packages/rules/package.json index 67165fee..17374f6c 100644 --- a/server/packages/rules/package.json +++ b/server/packages/rules/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/rules", - "version": "0.12.1", + "version": "0.12.2", "license": "MIT", "description": "The game-rules contract for the EigenInteractive engine: GameRules, GameModule, the hooks, and the Envelope/Observation types. Pure types, zero engine dependencies.", "main": "./dist/index.js", diff --git a/server/packages/server/CHANGELOG.md b/server/packages/server/CHANGELOG.md index b72be5f8..70e16da7 100644 --- a/server/packages/server/CHANGELOG.md +++ b/server/packages/server/CHANGELOG.md @@ -1,5 +1,16 @@ # @eigeninteractive/server +## 0.12.2 + +### Patch Changes + +- [#155](https://github.com/eigeninteractive/eigen-platform/pull/155) [`69cbaa2`](https://github.com/eigeninteractive/eigen-platform/commit/69cbaa255988dc139980c156b6c65ef17412bc77) Thanks [@seenu-k](https://github.com/seenu-k)! - Update jose and validate Google Pub/Sub private claims from the verified JWT payload without weakening runtime checks. Move server and scaffold compilation to TypeScript 7 with the repaired tsdown declaration generator, update Cloudflare tooling, and regenerate Worker types. + + Generated apps use Flutter 3.47.9 / Dart 3.13.7, including certificate-store security fixes and the workspace native-assets test fix. Keep scaffold dependencies and Biome configuration aligned with the platform's validated toolchain. +- Updated dependencies []: + - @eigeninteractive/kernel@0.12.2 + - @eigeninteractive/rules@0.12.2 + ## 0.12.1 ### Patch Changes diff --git a/server/packages/server/openapi.json b/server/packages/server/openapi.json index 034ed4b8..dc2a2a79 100644 --- a/server/packages/server/openapi.json +++ b/server/packages/server/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "EigenInteractive Engine API", - "version": "0.12.1", + "version": "0.12.2", "description": "The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated." }, "tags": [ diff --git a/server/packages/server/package.json b/server/packages/server/package.json index c5cf5eae..61cbae8e 100644 --- a/server/packages/server/package.json +++ b/server/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/server", - "version": "0.12.1", + "version": "0.12.2", "license": "MIT", "description": "The deployable half of the EigenInteractive engine: the createEngine Worker factory, the BaseGameDO Durable Object base class, the D1 schema and appliers, auth, bots and push.", "main": "./dist/index.js", diff --git a/server/packages/testkit/CHANGELOG.md b/server/packages/testkit/CHANGELOG.md index b4181e6f..a949f062 100644 --- a/server/packages/testkit/CHANGELOG.md +++ b/server/packages/testkit/CHANGELOG.md @@ -1,5 +1,13 @@ # @eigeninteractive/testkit +## 0.12.2 + +### Patch Changes + +- Updated dependencies []: + - @eigeninteractive/kernel@0.12.2 + - @eigeninteractive/rules@0.12.2 + ## 0.12.1 ### Patch Changes diff --git a/server/packages/testkit/package.json b/server/packages/testkit/package.json index 05c309fa..f19faf96 100644 --- a/server/packages/testkit/package.json +++ b/server/packages/testkit/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/testkit", - "version": "0.12.1", + "version": "0.12.2", "license": "MIT", "description": "Test helpers for games built on the EigenInteractive engine: drive rules through the real kernel and run shared twin fixtures, with no Worker, database or network.", "main": "./dist/index.js", diff --git a/web/api/openapi.json b/web/api/openapi.json index 034ed4b8..dc2a2a79 100644 --- a/web/api/openapi.json +++ b/web/api/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "EigenInteractive Engine API", - "version": "0.12.1", + "version": "0.12.2", "description": "The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated." }, "tags": [ diff --git a/web/docs/reference/http-api/accept-friend-request.api.mdx b/web/docs/reference/http-api/accept-friend-request.api.mdx index 9d189e2b..3338919a 100644 --- a/web/docs/reference/http-api/accept-friend-request.api.mdx +++ b/web/docs/reference/http-api/accept-friend-request.api.mdx @@ -5,7 +5,7 @@ description: "acceptFriendRequest" sidebar_label: "acceptFriendRequest" hide_title: true hide_table_of_contents: true -api: {"operationId":"acceptFriendRequest","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"The request was accepted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"acceptFriendRequest","method":"post","path":"/api/engine/friends/requests/{userId}/accept","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"accept Friend Request","description":{"type":"text/plain"},"url":{"path":["api","engine","friends","requests",":userId","accept"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} +api: {"operationId":"acceptFriendRequest","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"The request was accepted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"acceptFriendRequest","method":"post","path":"/api/engine/friends/requests/{userId}/accept","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"accept Friend Request","description":{"type":"text/plain"},"url":{"path":["api","engine","friends","requests",":userId","accept"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/add-bot.api.mdx b/web/docs/reference/http-api/add-bot.api.mdx index c9262c64..54716e93 100644 --- a/web/docs/reference/http-api/add-bot.api.mdx +++ b/web/docs/reference/http-api/add-bot.api.mdx @@ -5,7 +5,7 @@ description: "addBot" sidebar_label: "addBot" hide_title: true hide_table_of_contents: true -api: {"operationId":"addBot","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"botId":{"type":"string"}},"required":["botId"],"title":"AddBot"}}}},"responses":{"200":{"description":"Bot seated: the post-commit session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"addBot","method":"post","path":"/api/engine/games/{gameId}/add-bot","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"botId":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"add Bot","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","add-bot"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"addBot","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"botId":{"type":"string"}},"required":["botId"],"title":"AddBot"}}}},"responses":{"200":{"description":"Bot seated: the post-commit session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"addBot","method":"post","path":"/api/engine/games/{gameId}/add-bot","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"botId":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"add Bot","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","add-bot"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/append-local-transitions.api.mdx b/web/docs/reference/http-api/append-local-transitions.api.mdx index aaf24121..5eb34ab0 100644 --- a/web/docs/reference/http-api/append-local-transitions.api.mdx +++ b/web/docs/reference/http-api/append-local-transitions.api.mdx @@ -5,7 +5,7 @@ description: "appendLocalTransitions" sidebar_label: "appendLocalTransitions" hide_title: true hide_table_of_contents: true -api: {"operationId":"appendLocalTransitions","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromVersion":{"type":"integer","minimum":0},"transitions":{"type":"array","items":{"type":"object","properties":{"seat":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["game","lifecycle"]},"data":{}},"required":["seat","kind"],"title":"LocalTransition"},"minItems":1,"maxItems":200}},"required":["fromVersion","transitions"],"title":"LocalTransitions"}}}},"responses":{"200":{"description":"How far the append got, and the rejection that stopped it","content":{"application/json":{"schema":{"type":"object","properties":{"applied":{"type":"integer"},"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"},"rejection":{"anyOf":[{"type":"object","properties":{"index":{"type":"integer"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"},"message":{"type":"string"}},"required":["index","code","message"],"title":"LocalRejection"},{"type":"null"}]}},"required":["applied","session","rejection"],"title":"LocalTransitionsApplied"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"appendLocalTransitions","method":"post","path":"/api/engine/games/{gameId}/local/transitions","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"fromVersion":0,"transitions":[{"seat":0,"kind":"game","data":{}}]},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"append Local Transitions","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","local","transitions"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"appendLocalTransitions","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromVersion":{"type":"integer","minimum":0},"transitions":{"type":"array","items":{"type":"object","properties":{"seat":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["game","lifecycle"]},"data":{}},"required":["seat","kind"],"title":"LocalTransition"},"minItems":1,"maxItems":200}},"required":["fromVersion","transitions"],"title":"LocalTransitions"}}}},"responses":{"200":{"description":"How far the append got, and the rejection that stopped it","content":{"application/json":{"schema":{"type":"object","properties":{"applied":{"type":"integer"},"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"},"rejection":{"anyOf":[{"type":"object","properties":{"index":{"type":"integer"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"},"message":{"type":"string"}},"required":["index","code","message"],"title":"LocalRejection"},{"type":"null"}]}},"required":["applied","session","rejection"],"title":"LocalTransitionsApplied"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"appendLocalTransitions","method":"post","path":"/api/engine/games/{gameId}/local/transitions","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"fromVersion":0,"transitions":[{"seat":0,"kind":"game","data":{}}]},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"append Local Transitions","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","local","transitions"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/block-user.api.mdx b/web/docs/reference/http-api/block-user.api.mdx index 0d5a1c70..b5b911f2 100644 --- a/web/docs/reference/http-api/block-user.api.mdx +++ b/web/docs/reference/http-api/block-user.api.mdx @@ -5,7 +5,7 @@ description: "blockUser" sidebar_label: "blockUser" hide_title: true hide_table_of_contents: true -api: {"operationId":"blockUser","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Blocked (idempotent)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"blockUser","method":"post","path":"/api/engine/friends/{userId}/block","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"block User","description":{"type":"text/plain"},"url":{"path":["api","engine","friends",":userId","block"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} +api: {"operationId":"blockUser","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Blocked (idempotent)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"blockUser","method":"post","path":"/api/engine/friends/{userId}/block","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"block User","description":{"type":"text/plain"},"url":{"path":["api","engine","friends",":userId","block"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/bot-action.api.mdx b/web/docs/reference/http-api/bot-action.api.mdx index 753356f6..a7111ac9 100644 --- a/web/docs/reference/http-api/bot-action.api.mdx +++ b/web/docs/reference/http-api/bot-action.api.mdx @@ -5,7 +5,7 @@ description: "botAction" sidebar_label: "botAction" hide_title: true hide_table_of_contents: true -api: {"operationId":"botAction","tags":["BotWebhook"],"security":[{"botHmac":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"botId":{"type":"string","minLength":1},"gameId":{"type":"string","minLength":1},"playerIndex":{"type":"integer","minimum":0},"version":{"type":"integer","minimum":0},"data":{}},"required":["botId","gameId","playerIndex","version"],"title":"BotAction"}}}},"responses":{"204":{"description":"The move was accepted and applied"},"400":{"description":"Malformed body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Invalid signature","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown game","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"botAction","method":"post","path":"/api/bot/action","securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"botId":"string","gameId":"string","playerIndex":0,"version":0,"data":{}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"bot Action","description":{"type":"text/plain"},"url":{"path":["api","bot","action"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Eigen-Signature","key":"key"},{"type":"any","value":"{{apiKey}}","key":"value"},{"type":"any","value":"header","key":"in"}]}}} +api: {"operationId":"botAction","tags":["BotWebhook"],"security":[{"botHmac":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"botId":{"type":"string","minLength":1},"gameId":{"type":"string","minLength":1},"playerIndex":{"type":"integer","minimum":0},"version":{"type":"integer","minimum":0},"data":{}},"required":["botId","gameId","playerIndex","version"],"title":"BotAction"}}}},"responses":{"204":{"description":"The move was accepted and applied"},"400":{"description":"Malformed body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Invalid signature","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown game","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"botAction","method":"post","path":"/api/bot/action","securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"botId":"string","gameId":"string","playerIndex":0,"version":0,"data":{}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"bot Action","description":{"type":"text/plain"},"url":{"path":["api","bot","action"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Eigen-Signature","key":"key"},{"type":"any","value":"{{apiKey}}","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/cancel-game.api.mdx b/web/docs/reference/http-api/cancel-game.api.mdx index 446eaacc..ff96c1a1 100644 --- a/web/docs/reference/http-api/cancel-game.api.mdx +++ b/web/docs/reference/http-api/cancel-game.api.mdx @@ -5,7 +5,7 @@ description: "cancelGame" sidebar_label: "cancelGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"cancelGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"cancelGame","method":"post","path":"/api/engine/games/{gameId}/cancel","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"cancel Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","cancel"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} +api: {"operationId":"cancelGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"cancelGame","method":"post","path":"/api/engine/games/{gameId}/cancel","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"cancel Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","cancel"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/claim-commerce-purchase.api.mdx b/web/docs/reference/http-api/claim-commerce-purchase.api.mdx index 1fd6e8f1..eeab7399 100644 --- a/web/docs/reference/http-api/claim-commerce-purchase.api.mdx +++ b/web/docs/reference/http-api/claim-commerce-purchase.api.mdx @@ -5,7 +5,7 @@ description: "claimCommercePurchase" sidebar_label: "claimCommercePurchase" hide_title: true hide_table_of_contents: true -api: {"operationId":"claimCommercePurchase","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"offerKey":{"type":"string"},"evidence":{"type":"object","additionalProperties":{}}},"required":["provider","offerKey","evidence"],"title":"CommerceClaim"}}}},"responses":{"200":{"description":"Purchase verified and effective access refreshed","content":{"application/json":{"schema":{"type":"object","properties":{"entitlements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"validFrom":{"type":"integer"},"validUntil":{"type":["integer","null"]}},"required":["key","validFrom","validUntil"],"title":"ActiveEntitlement"}},"permissions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app.access","game.create","game.join","game.create.rated","bot.use","content.use","replay.read","analysis.use"]},"access":{"type":"string","enum":["public","private","friends"]},"tier":{"type":"string"},"collection":{"type":"string"},"id":{"type":"string"},"analysisType":{"type":"string"}},"required":["kind"],"title":"AccessCapability"}},"content":{"type":"array","items":{"type":"object","properties":{"collection":{"type":"string"},"id":{"type":"string"}},"required":["collection","id"],"title":"ContentGrant"}},"limits":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["game.create.success","games.openCreated","bot.game.success","analysis.run.success"]},"maximum":{"type":["integer","null"],"minimum":0},"noCommercialLimit":{"type":"boolean"},"period":{"type":["string","null"],"enum":["calendarMonth","subscriptionPeriod","lifetime","concurrent",null],"description":"The commercial accounting window. Calendar months always use UTC.","title":"CommercialPeriodKind"},"used":{"type":"integer","minimum":0},"remaining":{"type":["integer","null"],"minimum":0},"resetsAt":{"type":["integer","null"]}},"required":["metric","maximum","noCommercialLimit","period","used","remaining","resetsAt"],"title":"CommercialLimitAccess"}}},"required":["entitlements","permissions","content","limits"],"title":"AccessSnapshot"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"claimCommercePurchase","method":"post","path":"/api/engine/commerce/claims","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"provider":"string","offerKey":"string","evidence":{}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"claim Commerce Purchase","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","claims"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"claimCommercePurchase","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"offerKey":{"type":"string"},"evidence":{"type":"object","additionalProperties":{}}},"required":["provider","offerKey","evidence"],"title":"CommerceClaim"}}}},"responses":{"200":{"description":"Purchase verified and effective access refreshed","content":{"application/json":{"schema":{"type":"object","properties":{"entitlements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"validFrom":{"type":"integer"},"validUntil":{"type":["integer","null"]}},"required":["key","validFrom","validUntil"],"title":"ActiveEntitlement"}},"permissions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app.access","game.create","game.join","game.create.rated","bot.use","content.use","replay.read","analysis.use"]},"access":{"type":"string","enum":["public","private","friends"]},"tier":{"type":"string"},"collection":{"type":"string"},"id":{"type":"string"},"analysisType":{"type":"string"}},"required":["kind"],"title":"AccessCapability"}},"content":{"type":"array","items":{"type":"object","properties":{"collection":{"type":"string"},"id":{"type":"string"}},"required":["collection","id"],"title":"ContentGrant"}},"limits":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["game.create.success","games.openCreated","bot.game.success","analysis.run.success"]},"maximum":{"type":["integer","null"],"minimum":0},"noCommercialLimit":{"type":"boolean"},"period":{"type":["string","null"],"enum":["calendarMonth","subscriptionPeriod","lifetime","concurrent",null],"description":"The commercial accounting window. Calendar months always use UTC.","title":"CommercialPeriodKind"},"used":{"type":"integer","minimum":0},"remaining":{"type":["integer","null"],"minimum":0},"resetsAt":{"type":["integer","null"]}},"required":["metric","maximum","noCommercialLimit","period","used","remaining","resetsAt"],"title":"CommercialLimitAccess"}}},"required":["entitlements","permissions","content","limits"],"title":"AccessSnapshot"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"claimCommercePurchase","method":"post","path":"/api/engine/commerce/claims","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"provider":"string","offerKey":"string","evidence":{}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"claim Commerce Purchase","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","claims"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/create-commerce-checkout.api.mdx b/web/docs/reference/http-api/create-commerce-checkout.api.mdx index 8534a826..8a8bf277 100644 --- a/web/docs/reference/http-api/create-commerce-checkout.api.mdx +++ b/web/docs/reference/http-api/create-commerce-checkout.api.mdx @@ -5,7 +5,7 @@ description: "createCommerceCheckout" sidebar_label: "createCommerceCheckout" hide_title: true hide_table_of_contents: true -api: {"operationId":"createCommerceCheckout","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"offerKey":{"type":"string"},"returnUrl":{"type":"string","format":"uri"},"operationId":{"type":"string","minLength":1,"maxLength":128}},"required":["provider","offerKey","returnUrl","operationId"],"title":"CommerceCheckoutRequest"}}}},"responses":{"200":{"description":"Provider-hosted checkout URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"title":"CommerceUrl"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createCommerceCheckout","method":"post","path":"/api/engine/commerce/checkout","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"provider":"string","offerKey":"string","returnUrl":"string","operationId":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Commerce Checkout","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","checkout"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"createCommerceCheckout","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"offerKey":{"type":"string"},"returnUrl":{"type":"string","format":"uri"},"operationId":{"type":"string","minLength":1,"maxLength":128}},"required":["provider","offerKey","returnUrl","operationId"],"title":"CommerceCheckoutRequest"}}}},"responses":{"200":{"description":"Provider-hosted checkout URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"title":"CommerceUrl"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createCommerceCheckout","method":"post","path":"/api/engine/commerce/checkout","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"provider":"string","offerKey":"string","returnUrl":"string","operationId":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Commerce Checkout","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","checkout"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/create-commerce-management.api.mdx b/web/docs/reference/http-api/create-commerce-management.api.mdx index 9797ccc4..18366e5d 100644 --- a/web/docs/reference/http-api/create-commerce-management.api.mdx +++ b/web/docs/reference/http-api/create-commerce-management.api.mdx @@ -5,7 +5,7 @@ description: "createCommerceManagement" sidebar_label: "createCommerceManagement" hide_title: true hide_table_of_contents: true -api: {"operationId":"createCommerceManagement","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"returnUrl":{"type":"string","format":"uri"}},"required":["provider","returnUrl"],"title":"CommerceManagementRequest"}}}},"responses":{"200":{"description":"Provider-hosted subscription management URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"title":"CommerceUrl"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createCommerceManagement","method":"post","path":"/api/engine/commerce/management","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"provider":"string","returnUrl":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Commerce Management","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","management"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"createCommerceManagement","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"returnUrl":{"type":"string","format":"uri"}},"required":["provider","returnUrl"],"title":"CommerceManagementRequest"}}}},"responses":{"200":{"description":"Provider-hosted subscription management URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"title":"CommerceUrl"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createCommerceManagement","method":"post","path":"/api/engine/commerce/management","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"provider":"string","returnUrl":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Commerce Management","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","management"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/create-game.api.mdx b/web/docs/reference/http-api/create-game.api.mdx index 8d4f9ab7..7d1af0c6 100644 --- a/web/docs/reference/http-api/create-game.api.mdx +++ b/web/docs/reference/http-api/create-game.api.mdx @@ -5,7 +5,7 @@ description: "createGame" sidebar_label: "createGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"createGame","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creationId":{"type":"string","format":"uuid"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"schemaVersion":{"type":"integer","exclusiveMinimum":0,"description":"The newest schemaVersion bundled by this client. New games always use exactly the server's latest installed version.","example":1},"config":{"type":"object"},"minPlayers":{"type":"integer","minimum":1},"maxPlayers":{"type":"integer","minimum":1},"rated":{"type":"boolean"},"turnSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"budgetSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"incrementSeconds":{"type":["integer","null"],"minimum":0,"default":null}},"required":["creationId","access","schemaVersion","config"],"title":"CreateGame"}}}},"responses":{"201":{"description":"The created game","content":{"application/json":{"schema":{"type":"object","properties":{"gameId":{"type":"string"},"shortCode":{"type":"string"}},"required":["gameId","shortCode"],"title":"Created"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createGame","method":"post","path":"/api/engine/games","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"creationId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","access":"public","schemaVersion":1,"config":{},"minPlayers":0,"maxPlayers":0,"rated":true,"turnSeconds":null,"budgetSeconds":null,"incrementSeconds":null},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"createGame","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creationId":{"type":"string","format":"uuid"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"schemaVersion":{"type":"integer","exclusiveMinimum":0,"description":"The newest schemaVersion bundled by this client. New games always use exactly the server's latest installed version.","example":1},"config":{"type":"object"},"minPlayers":{"type":"integer","minimum":1},"maxPlayers":{"type":"integer","minimum":1},"rated":{"type":"boolean"},"turnSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"budgetSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"incrementSeconds":{"type":["integer","null"],"minimum":0,"default":null}},"required":["creationId","access","schemaVersion","config"],"title":"CreateGame"}}}},"responses":{"201":{"description":"The created game","content":{"application/json":{"schema":{"type":"object","properties":{"gameId":{"type":"string"},"shortCode":{"type":"string"}},"required":["gameId","shortCode"],"title":"Created"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createGame","method":"post","path":"/api/engine/games","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"creationId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","access":"public","schemaVersion":1,"config":{},"minPlayers":0,"maxPlayers":0,"rated":true,"turnSeconds":null,"budgetSeconds":null,"incrementSeconds":null},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/create-local-game.api.mdx b/web/docs/reference/http-api/create-local-game.api.mdx index 8f0ceb08..c5aa5bf0 100644 --- a/web/docs/reference/http-api/create-local-game.api.mdx +++ b/web/docs/reference/http-api/create-local-game.api.mdx @@ -5,7 +5,7 @@ description: "createLocalGame" sidebar_label: "createLocalGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"createLocalGame","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gameId":{"type":"string","minLength":1,"maxLength":64},"schemaVersion":{"type":"integer","exclusiveMinimum":0,"description":"The schemaVersion the device played at. Any version this deployment ships is accepted; a newer one answers 409 serverUpdateRequired.","example":1},"config":{"type":"object"},"minPlayers":{"type":"integer","minimum":1},"maxPlayers":{"type":"integer","minimum":1},"botIds":{"type":"array","items":{"type":"string"},"minItems":1},"seed":{"type":"string","pattern":"^[0-9a-f]{32}$","example":"0f1e2d3c4b5a69788796a5b4c3d2e1f0"},"createdAt":{"type":"integer","description":"Epoch milliseconds, as the device recorded it. Stored as min(claimed, server now)."}},"required":["gameId","schemaVersion","config","botIds","seed","createdAt"],"title":"CreateLocalGame"}}}},"responses":{"201":{"description":"The registered local game, at version 0","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"LocalStarted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createLocalGame","method":"post","path":"/api/engine/games/local","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"gameId":"string","schemaVersion":1,"config":{},"minPlayers":0,"maxPlayers":0,"botIds":["string"],"seed":"0f1e2d3c4b5a69788796a5b4c3d2e1f0","createdAt":0},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Local Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games","local"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"createLocalGame","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gameId":{"type":"string","minLength":1,"maxLength":64},"schemaVersion":{"type":"integer","exclusiveMinimum":0,"description":"The schemaVersion the device played at. Any version this deployment ships is accepted; a newer one answers 409 serverUpdateRequired.","example":1},"config":{"type":"object"},"minPlayers":{"type":"integer","minimum":1},"maxPlayers":{"type":"integer","minimum":1},"botIds":{"type":"array","items":{"type":"string"},"minItems":1},"seed":{"type":"string","pattern":"^[0-9a-f]{32}$","example":"0f1e2d3c4b5a69788796a5b4c3d2e1f0"},"createdAt":{"type":"integer","description":"Epoch milliseconds, as the device recorded it. Stored as min(claimed, server now)."}},"required":["gameId","schemaVersion","config","botIds","seed","createdAt"],"title":"CreateLocalGame"}}}},"responses":{"201":{"description":"The registered local game, at version 0","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"LocalStarted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createLocalGame","method":"post","path":"/api/engine/games/local","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"gameId":"string","schemaVersion":1,"config":{},"minPlayers":0,"maxPlayers":0,"botIds":["string"],"seed":"0f1e2d3c4b5a69788796a5b4c3d2e1f0","createdAt":0},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Local Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games","local"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/create-socket-ticket.api.mdx b/web/docs/reference/http-api/create-socket-ticket.api.mdx index 0a3f24b4..4fdaeaca 100644 --- a/web/docs/reference/http-api/create-socket-ticket.api.mdx +++ b/web/docs/reference/http-api/create-socket-ticket.api.mdx @@ -5,7 +5,7 @@ description: "createSocketTicket" sidebar_label: "createSocketTicket" hide_title: true hide_table_of_contents: true -api: {"operationId":"createSocketTicket","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"A short-lived credential for this game's WebSocket","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string"}},"required":["ticket"],"title":"SocketTicket"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createSocketTicket","method":"post","path":"/api/engine/games/{gameId}/socket-ticket","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Socket Ticket","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","socket-ticket"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} +api: {"operationId":"createSocketTicket","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"A short-lived credential for this game's WebSocket","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string"}},"required":["ticket"],"title":"SocketTicket"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createSocketTicket","method":"post","path":"/api/engine/games/{gameId}/socket-ticket","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Socket Ticket","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","socket-ticket"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/create-solo-game.api.mdx b/web/docs/reference/http-api/create-solo-game.api.mdx index 04a854d4..c23a817a 100644 --- a/web/docs/reference/http-api/create-solo-game.api.mdx +++ b/web/docs/reference/http-api/create-solo-game.api.mdx @@ -5,7 +5,7 @@ description: "createSoloGame" sidebar_label: "createSoloGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"createSoloGame","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creationId":{"type":"string","format":"uuid"},"schemaVersion":{"type":"integer","exclusiveMinimum":0,"description":"The newest schemaVersion bundled by this client. New games always use exactly the server's latest installed version.","example":1},"config":{"type":"object"},"minPlayers":{"type":"integer","minimum":1},"maxPlayers":{"type":"integer","minimum":1},"rated":{"type":"boolean"},"botIds":{"type":"array","items":{"type":"string"},"minItems":1},"turnSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"budgetSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"incrementSeconds":{"type":["integer","null"],"minimum":0,"default":null}},"required":["creationId","schemaVersion","config","botIds"],"title":"CreateSolo"}}}},"responses":{"201":{"description":"The created-and-started solo game","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"SoloStarted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createSoloGame","method":"post","path":"/api/engine/games/solo","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"creationId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","schemaVersion":1,"config":{},"minPlayers":0,"maxPlayers":0,"rated":true,"botIds":["string"],"turnSeconds":null,"budgetSeconds":null,"incrementSeconds":null},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Solo Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games","solo"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"createSoloGame","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creationId":{"type":"string","format":"uuid"},"schemaVersion":{"type":"integer","exclusiveMinimum":0,"description":"The newest schemaVersion bundled by this client. New games always use exactly the server's latest installed version.","example":1},"config":{"type":"object"},"minPlayers":{"type":"integer","minimum":1},"maxPlayers":{"type":"integer","minimum":1},"rated":{"type":"boolean"},"botIds":{"type":"array","items":{"type":"string"},"minItems":1},"turnSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"budgetSeconds":{"type":["integer","null"],"exclusiveMinimum":0,"default":null},"incrementSeconds":{"type":["integer","null"],"minimum":0,"default":null}},"required":["creationId","schemaVersion","config","botIds"],"title":"CreateSolo"}}}},"responses":{"201":{"description":"The created-and-started solo game","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"SoloStarted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"createSoloGame","method":"post","path":"/api/engine/games/solo","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"creationId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","schemaVersion":1,"config":{},"minPlayers":0,"maxPlayers":0,"rated":true,"botIds":["string"],"turnSeconds":null,"budgetSeconds":null,"incrementSeconds":null},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"create Solo Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games","solo"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/delete-account.api.mdx b/web/docs/reference/http-api/delete-account.api.mdx index d28d49f2..c4d0749e 100644 --- a/web/docs/reference/http-api/delete-account.api.mdx +++ b/web/docs/reference/http-api/delete-account.api.mdx @@ -5,7 +5,7 @@ description: "deleteAccount" sidebar_label: "deleteAccount" hide_title: true hide_table_of_contents: true -api: {"operationId":"deleteAccount","tags":["Me"],"responses":{"204":{"description":"The account and its data were deleted"},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"Deletion failed; the account is intact, retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"deleteAccount","method":"delete","path":"/api/engine/me","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"delete Account","description":{"type":"text/plain"},"url":{"path":["api","engine","me"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} +api: {"operationId":"deleteAccount","tags":["Me"],"responses":{"204":{"description":"The account and its data were deleted"},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"Deletion failed; the account is intact, retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"deleteAccount","method":"delete","path":"/api/engine/me","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"delete Account","description":{"type":"text/plain"},"url":{"path":["api","engine","me"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/eigeninteractive-engine-api.info.mdx b/web/docs/reference/http-api/eigeninteractive-engine-api.info.mdx index 14e72f74..cbc5b5a5 100644 --- a/web/docs/reference/http-api/eigeninteractive-engine-api.info.mdx +++ b/web/docs/reference/http-api/eigeninteractive-engine-api.info.mdx @@ -16,7 +16,7 @@ import Export from "@theme/ApiExplorer/Export"; diff --git a/web/docs/reference/http-api/forfeit-game.api.mdx b/web/docs/reference/http-api/forfeit-game.api.mdx index 6a073072..dd65ad65 100644 --- a/web/docs/reference/http-api/forfeit-game.api.mdx +++ b/web/docs/reference/http-api/forfeit-game.api.mdx @@ -5,7 +5,7 @@ description: "forfeitGame" sidebar_label: "forfeitGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"forfeitGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seat":{"type":"integer","minimum":0}},"required":["seat"],"title":"Forfeit"}}}},"responses":{"200":{"description":"Forfeit committed","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"forfeitGame","method":"post","path":"/api/engine/games/{gameId}/forfeit","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"seat":0},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"forfeit Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","forfeit"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"forfeitGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seat":{"type":"integer","minimum":0}},"required":["seat"],"title":"Forfeit"}}}},"responses":{"200":{"description":"Forfeit committed","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"forfeitGame","method":"post","path":"/api/engine/games/{gameId}/forfeit","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"seat":0},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"forfeit Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","forfeit"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-bots.api.mdx b/web/docs/reference/http-api/get-bots.api.mdx index fd6bd0c6..69988c1f 100644 --- a/web/docs/reference/http-api/get-bots.api.mdx +++ b/web/docs/reference/http-api/get-bots.api.mdx @@ -5,7 +5,7 @@ description: "getBots" sidebar_label: "getBots" hide_title: true hide_table_of_contents: true -api: {"operationId":"getBots","tags":["Bots"],"responses":{"200":{"description":"The bot catalog","content":{"application/json":{"schema":{"type":"object","properties":{"bots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"schemaVersion":{"type":"integer"},"type":{"type":"string","enum":["engine","external","local"],"description":"How this bot's moves are produced: `engine` in the server's game rules, `external` by a hosted service, `local` by a brain shipped in the client.","title":"BotType"},"ratedEligible":{"type":"boolean"},"config":{"type":"object"},"tier":{"type":"string","description":"The commercial tier this bot belongs to: its `botTiers` entry, or `standard`. A `local` bot is always `standard`, because the server never seats it. Presentation only: the server checks access when it seats the bot."}},"required":["id","username","displayName","avatarUrl","schemaVersion","type","ratedEligible","config","tier"],"title":"Bot"}}},"required":["bots"],"title":"Bots"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getBots","method":"get","path":"/api/engine/bots","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Bots","description":{"type":"text/plain"},"url":{"path":["api","engine","bots"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getBots","tags":["Bots"],"responses":{"200":{"description":"The bot catalog","content":{"application/json":{"schema":{"type":"object","properties":{"bots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"schemaVersion":{"type":"integer"},"type":{"type":"string","enum":["engine","external","local"],"description":"How this bot's moves are produced: `engine` in the server's game rules, `external` by a hosted service, `local` by a brain shipped in the client.","title":"BotType"},"ratedEligible":{"type":"boolean"},"config":{"type":"object"},"tier":{"type":"string","description":"The commercial tier this bot belongs to: its `botTiers` entry, or `standard`. A `local` bot is always `standard`, because the server never seats it. Presentation only: the server checks access when it seats the bot."}},"required":["id","username","displayName","avatarUrl","schemaVersion","type","ratedEligible","config","tier"],"title":"Bot"}}},"required":["bots"],"title":"Bots"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getBots","method":"get","path":"/api/engine/bots","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Bots","description":{"type":"text/plain"},"url":{"path":["api","engine","bots"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-commerce-access.api.mdx b/web/docs/reference/http-api/get-commerce-access.api.mdx index 57abeb41..05f4d742 100644 --- a/web/docs/reference/http-api/get-commerce-access.api.mdx +++ b/web/docs/reference/http-api/get-commerce-access.api.mdx @@ -5,7 +5,7 @@ description: "getCommerceAccess" sidebar_label: "getCommerceAccess" hide_title: true hide_table_of_contents: true -api: {"operationId":"getCommerceAccess","tags":["Commerce"],"responses":{"200":{"description":"Effective entitlements, capabilities, content, and limits","content":{"application/json":{"schema":{"type":"object","properties":{"entitlements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"validFrom":{"type":"integer"},"validUntil":{"type":["integer","null"]}},"required":["key","validFrom","validUntil"],"title":"ActiveEntitlement"}},"permissions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app.access","game.create","game.join","game.create.rated","bot.use","content.use","replay.read","analysis.use"]},"access":{"type":"string","enum":["public","private","friends"]},"tier":{"type":"string"},"collection":{"type":"string"},"id":{"type":"string"},"analysisType":{"type":"string"}},"required":["kind"],"title":"AccessCapability"}},"content":{"type":"array","items":{"type":"object","properties":{"collection":{"type":"string"},"id":{"type":"string"}},"required":["collection","id"],"title":"ContentGrant"}},"limits":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["game.create.success","games.openCreated","bot.game.success","analysis.run.success"]},"maximum":{"type":["integer","null"],"minimum":0},"noCommercialLimit":{"type":"boolean"},"period":{"type":["string","null"],"enum":["calendarMonth","subscriptionPeriod","lifetime","concurrent",null],"description":"The commercial accounting window. Calendar months always use UTC.","title":"CommercialPeriodKind"},"used":{"type":"integer","minimum":0},"remaining":{"type":["integer","null"],"minimum":0},"resetsAt":{"type":["integer","null"]}},"required":["metric","maximum","noCommercialLimit","period","used","remaining","resetsAt"],"title":"CommercialLimitAccess"}}},"required":["entitlements","permissions","content","limits"],"title":"AccessSnapshot"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getCommerceAccess","method":"get","path":"/api/engine/commerce/access","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Commerce Access","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","access"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getCommerceAccess","tags":["Commerce"],"responses":{"200":{"description":"Effective entitlements, capabilities, content, and limits","content":{"application/json":{"schema":{"type":"object","properties":{"entitlements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"validFrom":{"type":"integer"},"validUntil":{"type":["integer","null"]}},"required":["key","validFrom","validUntil"],"title":"ActiveEntitlement"}},"permissions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app.access","game.create","game.join","game.create.rated","bot.use","content.use","replay.read","analysis.use"]},"access":{"type":"string","enum":["public","private","friends"]},"tier":{"type":"string"},"collection":{"type":"string"},"id":{"type":"string"},"analysisType":{"type":"string"}},"required":["kind"],"title":"AccessCapability"}},"content":{"type":"array","items":{"type":"object","properties":{"collection":{"type":"string"},"id":{"type":"string"}},"required":["collection","id"],"title":"ContentGrant"}},"limits":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["game.create.success","games.openCreated","bot.game.success","analysis.run.success"]},"maximum":{"type":["integer","null"],"minimum":0},"noCommercialLimit":{"type":"boolean"},"period":{"type":["string","null"],"enum":["calendarMonth","subscriptionPeriod","lifetime","concurrent",null],"description":"The commercial accounting window. Calendar months always use UTC.","title":"CommercialPeriodKind"},"used":{"type":"integer","minimum":0},"remaining":{"type":["integer","null"],"minimum":0},"resetsAt":{"type":["integer","null"]}},"required":["metric","maximum","noCommercialLimit","period","used","remaining","resetsAt"],"title":"CommercialLimitAccess"}}},"required":["entitlements","permissions","content","limits"],"title":"AccessSnapshot"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getCommerceAccess","method":"get","path":"/api/engine/commerce/access","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Commerce Access","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","access"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-commerce-catalog.api.mdx b/web/docs/reference/http-api/get-commerce-catalog.api.mdx index 756d8ad2..2a0be68a 100644 --- a/web/docs/reference/http-api/get-commerce-catalog.api.mdx +++ b/web/docs/reference/http-api/get-commerce-catalog.api.mdx @@ -5,7 +5,7 @@ description: "getCommerceCatalog" sidebar_label: "getCommerceCatalog" hide_title: true hide_table_of_contents: true -api: {"operationId":"getCommerceCatalog","tags":["Commerce"],"parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"provider","in":"query"}],"responses":{"200":{"description":"Registered offers and storefront products","content":{"application/json":{"schema":{"type":"object","properties":{"offers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["oneTime","subscription"]},"entitlements":{"type":"array","items":{"type":"string"}},"repeatable":{"type":"boolean"},"products":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"providerReference":{"type":"string"},"displayPrice":{"type":["string","null"]},"currencyCode":{"type":["string","null"]}},"required":["provider","providerReference","displayPrice","currencyCode"],"title":"CommerceProduct"}}},"required":["key","name","description","kind","entitlements","repeatable","products"],"title":"CommerceOffer"}}},"required":["offers"],"title":"CommerceCatalog"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getCommerceCatalog","method":"get","path":"/api/engine/commerce/catalog","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Commerce Catalog","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","catalog"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"provider","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getCommerceCatalog","tags":["Commerce"],"parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"provider","in":"query"}],"responses":{"200":{"description":"Registered offers and storefront products","content":{"application/json":{"schema":{"type":"object","properties":{"offers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["oneTime","subscription"]},"entitlements":{"type":"array","items":{"type":"string"}},"repeatable":{"type":"boolean"},"products":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"providerReference":{"type":"string"},"displayPrice":{"type":["string","null"]},"currencyCode":{"type":["string","null"]}},"required":["provider","providerReference","displayPrice","currencyCode"],"title":"CommerceProduct"}}},"required":["key","name","description","kind","entitlements","repeatable","products"],"title":"CommerceOffer"}}},"required":["offers"],"title":"CommerceCatalog"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getCommerceCatalog","method":"get","path":"/api/engine/commerce/catalog","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Commerce Catalog","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","catalog"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"provider","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-frames.api.mdx b/web/docs/reference/http-api/get-frames.api.mdx index bcf9308b..925ee1e8 100644 --- a/web/docs/reference/http-api/get-frames.api.mdx +++ b/web/docs/reference/http-api/get-frames.api.mdx @@ -5,7 +5,7 @@ description: "getFrames" sidebar_label: "getFrames" hide_title: true hide_table_of_contents: true -api: {"operationId":"getFrames","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"required":false,"name":"from","in":"query"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"The projected frames, version-ascending","content":{"application/json":{"schema":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"}}},"required":["frames"],"title":"Frames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getFrames","method":"get","path":"/api/engine/games/{gameId}/frames","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Frames","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","frames"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"from","value":""},{"disabled":false,"key":"to","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getFrames","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"required":false,"name":"from","in":"query"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"The projected frames, version-ascending","content":{"application/json":{"schema":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"}}},"required":["frames"],"title":"Frames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getFrames","method":"get","path":"/api/engine/games/{gameId}/frames","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Frames","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","frames"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"from","value":""},{"disabled":false,"key":"to","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-friends-games.api.mdx b/web/docs/reference/http-api/get-friends-games.api.mdx index 0ac2add8..97ed50c1 100644 --- a/web/docs/reference/http-api/get-friends-games.api.mdx +++ b/web/docs/reference/http-api/get-friends-games.api.mdx @@ -5,7 +5,7 @@ description: "getFriendsGames" sidebar_label: "getFriendsGames" hide_title: true hide_table_of_contents: true -api: {"operationId":"getFriendsGames","tags":["Social"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Joinable games created by the caller's friends","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"FriendsGames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getFriendsGames","method":"get","path":"/api/engine/friends/games","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Friends Games","description":{"type":"text/plain"},"url":{"path":["api","engine","friends","games"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getFriendsGames","tags":["Social"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Joinable games created by the caller's friends","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"FriendsGames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getFriendsGames","method":"get","path":"/api/engine/friends/games","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Friends Games","description":{"type":"text/plain"},"url":{"path":["api","engine","friends","games"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-game-session.api.mdx b/web/docs/reference/http-api/get-game-session.api.mdx index a8ae5a45..d9ed368f 100644 --- a/web/docs/reference/http-api/get-game-session.api.mdx +++ b/web/docs/reference/http-api/get-game-session.api.mdx @@ -5,7 +5,7 @@ description: "getGameSession" sidebar_label: "getGameSession" hide_title: true hide_table_of_contents: true -api: {"operationId":"getGameSession","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"The caller's current session snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getGameSession","method":"get","path":"/api/engine/games/{gameId}/session","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Game Session","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","session"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getGameSession","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"The caller's current session snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getGameSession","method":"get","path":"/api/engine/games/{gameId}/session","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Game Session","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","session"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-game.api.mdx b/web/docs/reference/http-api/get-game.api.mdx index 03ed414c..18f4a63a 100644 --- a/web/docs/reference/http-api/get-game.api.mdx +++ b/web/docs/reference/http-api/get-game.api.mdx @@ -5,7 +5,7 @@ description: "getGame" sidebar_label: "getGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"getGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"The game summary, never state","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getGame","method":"get","path":"/api/engine/games/{gameId}","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"The game summary, never state","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getGame","method":"get","path":"/api/engine/games/{gameId}","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-health.api.mdx b/web/docs/reference/http-api/get-health.api.mdx index 49c994c7..ce59e9b5 100644 --- a/web/docs/reference/http-api/get-health.api.mdx +++ b/web/docs/reference/http-api/get-health.api.mdx @@ -5,7 +5,7 @@ description: "Public, unauthenticated liveness check. Performs no I/O and reads sidebar_label: "Liveness probe" hide_title: true hide_table_of_contents: true -api: {"operationId":"getHealth","tags":["Health"],"security":[],"description":"Public, unauthenticated liveness check. Performs no I/O and reads no configuration, so a 200 means only that the worker is deployed and routable. It does **not** imply that D1, the game Durable Objects, or auth are correctly configured. Served `no-store`. Safe to call without a token; a bad token is ignored rather than rejected.","responses":{"200":{"description":"The worker is deployed and serving","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"],"title":"Health"}}}}},"method":"get","path":"/health","securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"Liveness probe","description":{"content":"Public, unauthenticated liveness check. Performs no I/O and reads no configuration, so a 200 means only that the worker is deployed and routable. It does **not** imply that D1, the game Durable Objects, or auth are correctly configured. Served `no-store`. Safe to call without a token; a bad token is ignored rather than rejected.","type":"text/plain"},"url":{"path":["health"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getHealth","tags":["Health"],"security":[],"description":"Public, unauthenticated liveness check. Performs no I/O and reads no configuration, so a 200 means only that the worker is deployed and routable. It does **not** imply that D1, the game Durable Objects, or auth are correctly configured. Served `no-store`. Safe to call without a token; a bad token is ignored rather than rejected.","responses":{"200":{"description":"The worker is deployed and serving","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"],"title":"Health"}}}}},"method":"get","path":"/health","securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"Liveness probe","description":{"content":"Public, unauthenticated liveness check. Performs no I/O and reads no configuration, so a 200 means only that the worker is deployed and routable. It does **not** imply that D1, the game Durable Objects, or auth are correctly configured. Served `no-store`. Safe to call without a token; a bad token is ignored rather than rejected.","type":"text/plain"},"url":{"path":["health"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-lobby.api.mdx b/web/docs/reference/http-api/get-lobby.api.mdx index 7eca33cb..a2423c3b 100644 --- a/web/docs/reference/http-api/get-lobby.api.mdx +++ b/web/docs/reference/http-api/get-lobby.api.mdx @@ -5,7 +5,7 @@ description: "getLobby" sidebar_label: "getLobby" hide_title: true hide_table_of_contents: true -api: {"operationId":"getLobby","tags":["Games"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Public joinable games, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"Lobby"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getLobby","method":"get","path":"/api/engine/lobby","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Lobby","description":{"type":"text/plain"},"url":{"path":["api","engine","lobby"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getLobby","tags":["Games"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Public joinable games, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"Lobby"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getLobby","method":"get","path":"/api/engine/lobby","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Lobby","description":{"type":"text/plain"},"url":{"path":["api","engine","lobby"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-local-record.api.mdx b/web/docs/reference/http-api/get-local-record.api.mdx index fe382e4f..65e7adf5 100644 --- a/web/docs/reference/http-api/get-local-record.api.mdx +++ b/web/docs/reference/http-api/get-local-record.api.mdx @@ -5,7 +5,7 @@ description: "getLocalRecord" sidebar_label: "getLocalRecord" hide_title: true hide_table_of_contents: true -api: {"operationId":"getLocalRecord","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"required":false,"name":"from","in":"query"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"The stored log: seed, raw state and actions, version-ascending","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"},"seed":{"type":"string","pattern":"^[0-9a-f]{32}$","example":"0f1e2d3c4b5a69788796a5b4c3d2e1f0"},"createdAt":{"type":"integer"},"finishedAt":{"type":["integer","null"]},"transitions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer"},"state":{"type":"object"},"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","bot","system"]},"kind":{"type":"string","enum":["game","lifecycle","ratings"]},"data":{"type":"object"},"playerIndex":{"type":["integer","null"]}},"required":["type","kind","data","playerIndex"],"title":"TransitionAction"},{"type":"null"}]},"pending":{"type":"array","items":{"type":"integer"}}},"required":["version","state","action","pending"],"title":"LocalTransitionRow"}}},"required":["session","seed","createdAt","finishedAt","transitions"],"title":"LocalRecord"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getLocalRecord","method":"get","path":"/api/engine/games/{gameId}/local","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Local Record","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","local"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"from","value":""},{"disabled":false,"key":"to","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getLocalRecord","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"required":false,"name":"from","in":"query"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"The stored log: seed, raw state and actions, version-ascending","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"},"seed":{"type":"string","pattern":"^[0-9a-f]{32}$","example":"0f1e2d3c4b5a69788796a5b4c3d2e1f0"},"createdAt":{"type":"integer"},"finishedAt":{"type":["integer","null"]},"transitions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer"},"state":{"type":"object"},"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","bot","system"]},"kind":{"type":"string","enum":["game","lifecycle","ratings"]},"data":{"type":"object"},"playerIndex":{"type":["integer","null"]}},"required":["type","kind","data","playerIndex"],"title":"TransitionAction"},{"type":"null"}]},"pending":{"type":"array","items":{"type":"integer"}}},"required":["version","state","action","pending"],"title":"LocalTransitionRow"}}},"required":["session","seed","createdAt","finishedAt","transitions"],"title":"LocalRecord"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getLocalRecord","method":"get","path":"/api/engine/games/{gameId}/local","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Local Record","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","local"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"from","value":""},{"disabled":false,"key":"to","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-my-finished-games.api.mdx b/web/docs/reference/http-api/get-my-finished-games.api.mdx index 6b5b3726..970d1f38 100644 --- a/web/docs/reference/http-api/get-my-finished-games.api.mdx +++ b/web/docs/reference/http-api/get-my-finished-games.api.mdx @@ -5,7 +5,7 @@ description: "getMyFinishedGames" sidebar_label: "getMyFinishedGames" hide_title: true hide_table_of_contents: true -api: {"operationId":"getMyFinishedGames","tags":["Me"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The caller's finished games, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"MyFinishedGames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getMyFinishedGames","method":"get","path":"/api/engine/me/games/finished","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get My Finished Games","description":{"type":"text/plain"},"url":{"path":["api","engine","me","games","finished"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getMyFinishedGames","tags":["Me"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"The caller's finished games, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"MyFinishedGames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getMyFinishedGames","method":"get","path":"/api/engine/me/games/finished","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get My Finished Games","description":{"type":"text/plain"},"url":{"path":["api","engine","me","games","finished"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-player-games.api.mdx b/web/docs/reference/http-api/get-player-games.api.mdx index e289d716..36349f1e 100644 --- a/web/docs/reference/http-api/get-player-games.api.mdx +++ b/web/docs/reference/http-api/get-player-games.api.mdx @@ -5,7 +5,7 @@ description: "getPlayerGames" sidebar_label: "getPlayerGames" hide_title: true hide_table_of_contents: true -api: {"operationId":"getPlayerGames","tags":["Players"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"playerId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"That player's finished public games, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"PlayerGames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getPlayerGames","method":"get","path":"/api/engine/players/{playerId}/games","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Player Games","description":{"type":"text/plain"},"url":{"path":["api","engine","players",":playerId","games"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"playerId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getPlayerGames","tags":["Players"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"playerId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"That player's finished public games, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"games":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to fetch the next page. Null when there are no more results."}},"required":["games","nextCursor"],"title":"PlayerGames"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getPlayerGames","method":"get","path":"/api/engine/players/{playerId}/games","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Player Games","description":{"type":"text/plain"},"url":{"path":["api","engine","players",":playerId","games"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"limit","value":""},{"disabled":false,"key":"cursor","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"playerId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-player-ratings.api.mdx b/web/docs/reference/http-api/get-player-ratings.api.mdx index 4adbc464..6929c0a7 100644 --- a/web/docs/reference/http-api/get-player-ratings.api.mdx +++ b/web/docs/reference/http-api/get-player-ratings.api.mdx @@ -5,7 +5,7 @@ description: "getPlayerRatings" sidebar_label: "getPlayerRatings" hide_title: true hide_table_of_contents: true -api: {"operationId":"getPlayerRatings","tags":["Players"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"playerId","in":"path"}],"responses":{"200":{"description":"That player's current rating per pool","content":{"application/json":{"schema":{"type":"object","properties":{"ratings":{"type":"array","items":{"type":"object","properties":{"pool":{"type":"string"},"mu":{"type":"number"},"sigma":{"type":"number"},"displayRating":{"type":"integer"},"updatedAt":{"type":"integer"}},"required":["pool","mu","sigma","displayRating","updatedAt"],"title":"Rating"}}},"required":["ratings"],"title":"Ratings"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getPlayerRatings","method":"get","path":"/api/engine/players/{playerId}/ratings","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Player Ratings","description":{"type":"text/plain"},"url":{"path":["api","engine","players",":playerId","ratings"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"playerId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getPlayerRatings","tags":["Players"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"playerId","in":"path"}],"responses":{"200":{"description":"That player's current rating per pool","content":{"application/json":{"schema":{"type":"object","properties":{"ratings":{"type":"array","items":{"type":"object","properties":{"pool":{"type":"string"},"mu":{"type":"number"},"sigma":{"type":"number"},"displayRating":{"type":"integer"},"updatedAt":{"type":"integer"}},"required":["pool","mu","sigma","displayRating","updatedAt"],"title":"Rating"}}},"required":["ratings"],"title":"Ratings"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getPlayerRatings","method":"get","path":"/api/engine/players/{playerId}/ratings","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Player Ratings","description":{"type":"text/plain"},"url":{"path":["api","engine","players",":playerId","ratings"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"playerId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-players.api.mdx b/web/docs/reference/http-api/get-players.api.mdx index 232c9d74..b9bd7c1b 100644 --- a/web/docs/reference/http-api/get-players.api.mdx +++ b/web/docs/reference/http-api/get-players.api.mdx @@ -5,7 +5,7 @@ description: "getPlayers" sidebar_label: "getPlayers" hide_title: true hide_table_of_contents: true -api: {"operationId":"getPlayers","tags":["Players"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"ids","in":"query"}],"responses":{"200":{"description":"Public identity for up to 50 comma-separated user ids","content":{"application/json":{"schema":{"type":"object","properties":{"players":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"}},"required":["id","username","displayName","avatarUrl","isAnonymous"],"title":"Player"}}},"required":["players"],"title":"Players"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getPlayers","method":"get","path":"/api/engine/players","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Players","description":{"type":"text/plain"},"url":{"path":["api","engine","players"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"key":"ids","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getPlayers","tags":["Players"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"ids","in":"query"}],"responses":{"200":{"description":"Public identity for up to 50 comma-separated user ids","content":{"application/json":{"schema":{"type":"object","properties":{"players":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"}},"required":["id","username","displayName","avatarUrl","isAnonymous"],"title":"Player"}}},"required":["players"],"title":"Players"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getPlayers","method":"get","path":"/api/engine/players","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Players","description":{"type":"text/plain"},"url":{"path":["api","engine","players"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"key":"ids","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/get-profile.api.mdx b/web/docs/reference/http-api/get-profile.api.mdx index 93da1ec9..dbd31ee2 100644 --- a/web/docs/reference/http-api/get-profile.api.mdx +++ b/web/docs/reference/http-api/get-profile.api.mdx @@ -5,7 +5,7 @@ description: "getProfile" sidebar_label: "getProfile" hide_title: true hide_table_of_contents: true -api: {"operationId":"getProfile","tags":["Me"],"responses":{"200":{"description":"The caller's own profile","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getProfile","method":"get","path":"/api/engine/me","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Profile","description":{"type":"text/plain"},"url":{"path":["api","engine","me"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"getProfile","tags":["Me"],"responses":{"200":{"description":"The caller's own profile","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"getProfile","method":"get","path":"/api/engine/me","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"get Profile","description":{"type":"text/plain"},"url":{"path":["api","engine","me"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/join-game-by-code.api.mdx b/web/docs/reference/http-api/join-game-by-code.api.mdx index caacbfe7..39b09985 100644 --- a/web/docs/reference/http-api/join-game-by-code.api.mdx +++ b/web/docs/reference/http-api/join-game-by-code.api.mdx @@ -5,7 +5,7 @@ description: "joinGameByCode" sidebar_label: "joinGameByCode" hide_title: true hide_table_of_contents: true -api: {"operationId":"joinGameByCode","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"clientSchemaVersion":{"type":"integer","exclusiveMinimum":0,"example":3}},"required":["clientSchemaVersion"],"title":"Join"},{"type":"object","properties":{"shortCode":{"type":"string","minLength":1}},"required":["shortCode"]}],"title":"JoinByCode"}}}},"responses":{"200":{"description":"Seated: the post-join session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"joinGameByCode","method":"post","path":"/api/engine/games/join-by-code","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"clientSchemaVersion":3,"shortCode":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"join Game By Code","description":{"type":"text/plain"},"url":{"path":["api","engine","games","join-by-code"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"joinGameByCode","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"clientSchemaVersion":{"type":"integer","exclusiveMinimum":0,"example":3}},"required":["clientSchemaVersion"],"title":"Join"},{"type":"object","properties":{"shortCode":{"type":"string","minLength":1}},"required":["shortCode"]}],"title":"JoinByCode"}}}},"responses":{"200":{"description":"Seated: the post-join session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"joinGameByCode","method":"post","path":"/api/engine/games/join-by-code","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"clientSchemaVersion":3,"shortCode":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"join Game By Code","description":{"type":"text/plain"},"url":{"path":["api","engine","games","join-by-code"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/join-game.api.mdx b/web/docs/reference/http-api/join-game.api.mdx index 80c641ee..15be42f9 100644 --- a/web/docs/reference/http-api/join-game.api.mdx +++ b/web/docs/reference/http-api/join-game.api.mdx @@ -5,7 +5,7 @@ description: "joinGame" sidebar_label: "joinGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"joinGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientSchemaVersion":{"type":"integer","exclusiveMinimum":0,"example":3}},"required":["clientSchemaVersion"],"title":"Join"}}}},"responses":{"200":{"description":"Seated: the post-join session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"joinGame","method":"post","path":"/api/engine/games/{gameId}/join","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"clientSchemaVersion":3},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"join Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","join"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"joinGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientSchemaVersion":{"type":"integer","exclusiveMinimum":0,"example":3}},"required":["clientSchemaVersion"],"title":"Join"}}}},"responses":{"200":{"description":"Seated: the post-join session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"joinGame","method":"post","path":"/api/engine/games/{gameId}/join","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"clientSchemaVersion":3},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"join Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","join"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/leave-game.api.mdx b/web/docs/reference/http-api/leave-game.api.mdx index 78d64e34..f2f08fca 100644 --- a/web/docs/reference/http-api/leave-game.api.mdx +++ b/web/docs/reference/http-api/leave-game.api.mdx @@ -5,7 +5,7 @@ description: "leaveGame" sidebar_label: "leaveGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"leaveGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"Left: the post-leave session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"leaveGame","method":"post","path":"/api/engine/games/{gameId}/leave","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"leave Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","leave"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} +api: {"operationId":"leaveGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"Left: the post-leave session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"leaveGame","method":"post","path":"/api/engine/games/{gameId}/leave","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"leave Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","leave"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/register-device.api.mdx b/web/docs/reference/http-api/register-device.api.mdx index 6ab3d00b..275dd57b 100644 --- a/web/docs/reference/http-api/register-device.api.mdx +++ b/web/docs/reference/http-api/register-device.api.mdx @@ -5,7 +5,7 @@ description: "registerDevice" sidebar_label: "registerDevice" hide_title: true hide_table_of_contents: true -api: {"operationId":"registerDevice","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fid":{"type":"string","minLength":1,"maxLength":256},"platform":{"type":"string","enum":["ios","android","web"]}},"required":["fid","platform"],"title":"DeviceRegistration"}}}},"responses":{"204":{"description":"Registered: the caller's pushes will reach this install"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"registerDevice","method":"put","path":"/api/engine/me/devices","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"fid":"string","platform":"ios"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"register Device","description":{"type":"text/plain"},"url":{"path":["api","engine","me","devices"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"registerDevice","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fid":{"type":"string","minLength":1,"maxLength":256},"platform":{"type":"string","enum":["ios","android","web"]}},"required":["fid","platform"],"title":"DeviceRegistration"}}}},"responses":{"204":{"description":"Registered: the caller's pushes will reach this install"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"registerDevice","method":"put","path":"/api/engine/me/devices","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"fid":"string","platform":"ios"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"register Device","description":{"type":"text/plain"},"url":{"path":["api","engine","me","devices"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "put api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/remove-friend.api.mdx b/web/docs/reference/http-api/remove-friend.api.mdx index 05267d19..6d16b50f 100644 --- a/web/docs/reference/http-api/remove-friend.api.mdx +++ b/web/docs/reference/http-api/remove-friend.api.mdx @@ -5,7 +5,7 @@ description: "removeFriend" sidebar_label: "removeFriend" hide_title: true hide_table_of_contents: true -api: {"operationId":"removeFriend","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Unfriended / request withdrawn / declined (idempotent)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"removeFriend","method":"delete","path":"/api/engine/friends/{userId}","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"remove Friend","description":{"type":"text/plain"},"url":{"path":["api","engine","friends",":userId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} +api: {"operationId":"removeFriend","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Unfriended / request withdrawn / declined (idempotent)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"removeFriend","method":"delete","path":"/api/engine/friends/{userId}","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"remove Friend","description":{"type":"text/plain"},"url":{"path":["api","engine","friends",":userId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/restore-commerce-purchases.api.mdx b/web/docs/reference/http-api/restore-commerce-purchases.api.mdx index 7b79c62b..15cf4ca3 100644 --- a/web/docs/reference/http-api/restore-commerce-purchases.api.mdx +++ b/web/docs/reference/http-api/restore-commerce-purchases.api.mdx @@ -5,7 +5,7 @@ description: "restoreCommercePurchases" sidebar_label: "restoreCommercePurchases" hide_title: true hide_table_of_contents: true -api: {"operationId":"restoreCommercePurchases","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"claims":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"offerKey":{"type":"string"},"evidence":{"type":"object","additionalProperties":{}}},"required":["provider","offerKey","evidence"],"title":"CommerceClaim"},"minItems":1,"maxItems":100}},"required":["claims"],"title":"CommerceRestore"}}}},"responses":{"200":{"description":"Submitted purchases restored and effective access refreshed","content":{"application/json":{"schema":{"type":"object","properties":{"entitlements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"validFrom":{"type":"integer"},"validUntil":{"type":["integer","null"]}},"required":["key","validFrom","validUntil"],"title":"ActiveEntitlement"}},"permissions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app.access","game.create","game.join","game.create.rated","bot.use","content.use","replay.read","analysis.use"]},"access":{"type":"string","enum":["public","private","friends"]},"tier":{"type":"string"},"collection":{"type":"string"},"id":{"type":"string"},"analysisType":{"type":"string"}},"required":["kind"],"title":"AccessCapability"}},"content":{"type":"array","items":{"type":"object","properties":{"collection":{"type":"string"},"id":{"type":"string"}},"required":["collection","id"],"title":"ContentGrant"}},"limits":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["game.create.success","games.openCreated","bot.game.success","analysis.run.success"]},"maximum":{"type":["integer","null"],"minimum":0},"noCommercialLimit":{"type":"boolean"},"period":{"type":["string","null"],"enum":["calendarMonth","subscriptionPeriod","lifetime","concurrent",null],"description":"The commercial accounting window. Calendar months always use UTC.","title":"CommercialPeriodKind"},"used":{"type":"integer","minimum":0},"remaining":{"type":["integer","null"],"minimum":0},"resetsAt":{"type":["integer","null"]}},"required":["metric","maximum","noCommercialLimit","period","used","remaining","resetsAt"],"title":"CommercialLimitAccess"}}},"required":["entitlements","permissions","content","limits"],"title":"AccessSnapshot"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"restoreCommercePurchases","method":"post","path":"/api/engine/commerce/restore","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"claims":[{"provider":"string","offerKey":"string","evidence":{}}]},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"restore Commerce Purchases","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","restore"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"restoreCommercePurchases","tags":["Commerce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"claims":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"offerKey":{"type":"string"},"evidence":{"type":"object","additionalProperties":{}}},"required":["provider","offerKey","evidence"],"title":"CommerceClaim"},"minItems":1,"maxItems":100}},"required":["claims"],"title":"CommerceRestore"}}}},"responses":{"200":{"description":"Submitted purchases restored and effective access refreshed","content":{"application/json":{"schema":{"type":"object","properties":{"entitlements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"validFrom":{"type":"integer"},"validUntil":{"type":["integer","null"]}},"required":["key","validFrom","validUntil"],"title":"ActiveEntitlement"}},"permissions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app.access","game.create","game.join","game.create.rated","bot.use","content.use","replay.read","analysis.use"]},"access":{"type":"string","enum":["public","private","friends"]},"tier":{"type":"string"},"collection":{"type":"string"},"id":{"type":"string"},"analysisType":{"type":"string"}},"required":["kind"],"title":"AccessCapability"}},"content":{"type":"array","items":{"type":"object","properties":{"collection":{"type":"string"},"id":{"type":"string"}},"required":["collection","id"],"title":"ContentGrant"}},"limits":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["game.create.success","games.openCreated","bot.game.success","analysis.run.success"]},"maximum":{"type":["integer","null"],"minimum":0},"noCommercialLimit":{"type":"boolean"},"period":{"type":["string","null"],"enum":["calendarMonth","subscriptionPeriod","lifetime","concurrent",null],"description":"The commercial accounting window. Calendar months always use UTC.","title":"CommercialPeriodKind"},"used":{"type":"integer","minimum":0},"remaining":{"type":["integer","null"],"minimum":0},"resetsAt":{"type":["integer","null"]}},"required":["metric","maximum","noCommercialLimit","period","used","remaining","resetsAt"],"title":"CommercialLimitAccess"}}},"required":["entitlements","permissions","content","limits"],"title":"AccessSnapshot"}}}},"400":{"description":"Invalid commerce request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"A recoverable account or entitlement is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Unknown offer or provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Purchase is pending or conflicts with another account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"502":{"description":"The commerce provider could not verify the operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"restoreCommercePurchases","method":"post","path":"/api/engine/commerce/restore","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"claims":[{"provider":"string","offerKey":"string","evidence":{}}]},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"restore Commerce Purchases","description":{"type":"text/plain"},"url":{"path":["api","engine","commerce","restore"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/search-users.api.mdx b/web/docs/reference/http-api/search-users.api.mdx index c59bc64b..bfd3ffe3 100644 --- a/web/docs/reference/http-api/search-users.api.mdx +++ b/web/docs/reference/http-api/search-users.api.mdx @@ -5,7 +5,7 @@ description: "searchUsers" sidebar_label: "searchUsers" hide_title: true hide_table_of_contents: true -api: {"operationId":"searchUsers","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Matching registered users, best match first","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"}},"required":["id","username","displayName","avatarUrl","isAnonymous"],"title":"Player"}}},"required":["users"],"title":"UserSearch"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"searchUsers","method":"get","path":"/api/engine/users/search","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"search Users","description":{"type":"text/plain"},"url":{"path":["api","engine","users","search"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"key":"q","value":""},{"disabled":false,"key":"limit","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"searchUsers","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Matching registered users, best match first","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"}},"required":["id","username","displayName","avatarUrl","isAnonymous"],"title":"Player"}}},"required":["users"],"title":"UserSearch"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"searchUsers","method":"get","path":"/api/engine/users/search","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"search Users","description":{"type":"text/plain"},"url":{"path":["api","engine","users","search"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"key":"q","value":""},{"disabled":false,"key":"limit","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/send-friend-request.api.mdx b/web/docs/reference/http-api/send-friend-request.api.mdx index 97efefe3..5b9931d4 100644 --- a/web/docs/reference/http-api/send-friend-request.api.mdx +++ b/web/docs/reference/http-api/send-friend-request.api.mdx @@ -5,7 +5,7 @@ description: "sendFriendRequest" sidebar_label: "sendFriendRequest" hide_title: true hide_table_of_contents: true -api: {"operationId":"sendFriendRequest","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string","minLength":1}},"required":["targetUserId"],"title":"FriendTarget"}}}},"responses":{"200":{"description":"Request sent, or auto-accepted","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["requested","accepted"]}},"required":["status"],"title":"FriendRequestResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"sendFriendRequest","method":"post","path":"/api/engine/friends/requests","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"targetUserId":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"send Friend Request","description":{"type":"text/plain"},"url":{"path":["api","engine","friends","requests"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"sendFriendRequest","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string","minLength":1}},"required":["targetUserId"],"title":"FriendTarget"}}}},"responses":{"200":{"description":"Request sent, or auto-accepted","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["requested","accepted"]}},"required":["status"],"title":"FriendRequestResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"sendFriendRequest","method":"post","path":"/api/engine/friends/requests","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"targetUserId":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"send Friend Request","description":{"type":"text/plain"},"url":{"path":["api","engine","friends","requests"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/start-game.api.mdx b/web/docs/reference/http-api/start-game.api.mdx index ce210bcd..0aef2bbc 100644 --- a/web/docs/reference/http-api/start-game.api.mdx +++ b/web/docs/reference/http-api/start-game.api.mdx @@ -5,7 +5,7 @@ description: "startGame" sidebar_label: "startGame" hide_title: true hide_table_of_contents: true -api: {"operationId":"startGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"Started: the session at version 0","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"startGame","method":"post","path":"/api/engine/games/{gameId}/start","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"start Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","start"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} +api: {"operationId":"startGame","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"responses":{"200":{"description":"Started: the session at version 0","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"startGame","method":"post","path":"/api/engine/games/{gameId}/start","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"start Game","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","start"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/submit-action.api.mdx b/web/docs/reference/http-api/submit-action.api.mdx index 46983fea..a32c3ade 100644 --- a/web/docs/reference/http-api/submit-action.api.mdx +++ b/web/docs/reference/http-api/submit-action.api.mdx @@ -5,7 +5,7 @@ description: "submitAction" sidebar_label: "submitAction" hide_title: true hide_table_of_contents: true -api: {"operationId":"submitAction","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seat":{"type":"integer","minimum":0},"data":{},"expectedVersion":{"type":"integer","minimum":0}},"required":["seat","expectedVersion"],"title":"Action"}}}},"responses":{"200":{"description":"Committed: the acting seat's session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"submitAction","method":"post","path":"/api/engine/games/{gameId}/action","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"seat":0,"data":{},"expectedVersion":0},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"submit Action","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","action"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"submitAction","tags":["Games"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"gameId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seat":{"type":"integer","minimum":0},"data":{},"expectedVersion":{"type":"integer","minimum":0}},"required":["seat","expectedVersion"],"title":"Action"}}}},"responses":{"200":{"description":"Committed: the acting seat's session","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"type":{"type":"string","enum":["session"]},"seq":{"type":"integer"},"gameId":{"type":"string"},"shortCode":{"type":"string"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"players":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}},"version":{"type":["integer","null"]},"frame":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frame"]},"version":{"type":"integer"},"data":{"type":"object"},"pendingPlayers":{"type":"array","items":{"type":"integer"}},"deadline":{"type":["integer","null"]},"playerTimes":{"type":["array","null"],"items":{"type":"integer"}},"outcomes":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}}},"required":["type","version","data","pendingPlayers","deadline","playerTimes"],"title":"Frame"},{"type":"null"}]}},"required":["type","seq","gameId","shortCode","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","createdBy","status","players","version","frame"],"title":"Session"}},"required":["session"],"title":"CommandAccepted"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Stale view; resync and retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"422":{"description":"Assertion mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"submitAction","method":"post","path":"/api/engine/games/{gameId}/action","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"seat":0,"data":{},"expectedVersion":0},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"submit Action","description":{"type":"text/plain"},"url":{"path":["api","engine","games",":gameId","action"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"gameId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/sync-account.api.mdx b/web/docs/reference/http-api/sync-account.api.mdx index b2ed065b..9a13e893 100644 --- a/web/docs/reference/http-api/sync-account.api.mdx +++ b/web/docs/reference/http-api/sync-account.api.mdx @@ -5,7 +5,7 @@ description: "syncAccount" sidebar_label: "syncAccount" hide_title: true hide_table_of_contents: true -api: {"operationId":"syncAccount","tags":["Me"],"parameters":[{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":false,"name":"finishedAfter","in":"query"}],"responses":{"200":{"description":"The caller's account, whole where small and incremental where it grows","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"},"ratings":{"type":"array","items":{"type":"object","properties":{"pool":{"type":"string"},"mu":{"type":"number"},"sigma":{"type":"number"},"displayRating":{"type":"integer"},"updatedAt":{"type":"integer"}},"required":["pool","mu","sigma","displayRating","updatedAt"],"title":"Rating"},"description":"Every pool the caller is rated in. Whole."},"friends":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"userId":{"type":"string"},"since":{"type":"integer"}},"required":["username","displayName","avatarUrl","isAnonymous","userId","since"],"title":"Friend"},"description":"Accepted friends. Whole: an absent friend was removed."},"friendRequests":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"userId":{"type":"string"},"since":{"type":"integer"},"direction":{"type":"string","enum":["incoming","outgoing"]}},"required":["username","displayName","avatarUrl","isAnonymous","userId","since","direction"],"title":"FriendRequest"},"description":"Pending requests in both directions. Whole."},"activeGames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"},"description":"Every game the caller is seated in that has not ended. Whole: a game absent here has ended or the caller left it."},"finishedGames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"},"description":"With `finishedAfter`: the caller's games whose finish committed after that cursor, in commit order. Without it: the newest page of the caller's history, newest first."},"players":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"}},"required":["id","username","displayName","avatarUrl","isAnonymous"],"title":"Player"},"description":"The identity of every human seated in the games above."},"finishedCursor":{"type":"integer","description":"Pass as `finishedAfter` on the next sync."},"hasMoreFinished":{"type":"boolean","description":"More of the increment remains; sync again with `finishedCursor` straight away."},"historyFloor":{"type":["string","null"],"description":"Only on a sync without `finishedAfter`: pass as `cursor` to `getMyFinishedGames` for history older than `finishedGames`. Null when that page was the whole history, and always null on an incremental sync."}},"required":["account","ratings","friends","friendRequests","activeGames","finishedGames","players","finishedCursor","hasMoreFinished","historyFloor"],"title":"AccountSync"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"syncAccount","method":"get","path":"/api/engine/me/sync","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"sync Account","description":{"type":"text/plain"},"url":{"path":["api","engine","me","sync"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"finishedAfter","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"operationId":"syncAccount","tags":["Me"],"parameters":[{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":false,"name":"finishedAfter","in":"query"}],"responses":{"200":{"description":"The caller's account, whole where small and incremental where it grows","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"},"ratings":{"type":"array","items":{"type":"object","properties":{"pool":{"type":"string"},"mu":{"type":"number"},"sigma":{"type":"number"},"displayRating":{"type":"integer"},"updatedAt":{"type":"integer"}},"required":["pool","mu","sigma","displayRating","updatedAt"],"title":"Rating"},"description":"Every pool the caller is rated in. Whole."},"friends":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"userId":{"type":"string"},"since":{"type":"integer"}},"required":["username","displayName","avatarUrl","isAnonymous","userId","since"],"title":"Friend"},"description":"Accepted friends. Whole: an absent friend was removed."},"friendRequests":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"userId":{"type":"string"},"since":{"type":"integer"},"direction":{"type":"string","enum":["incoming","outgoing"]}},"required":["username","displayName","avatarUrl","isAnonymous","userId","since","direction"],"title":"FriendRequest"},"description":"Pending requests in both directions. Whole."},"activeGames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"},"description":"Every game the caller is seated in that has not ended. Whole: a game absent here has ended or the caller left it."},"finishedGames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The game's revision: the same per-game counter a `Session` carries as `seq`, as of the commit this summary reflects. A client holding a game from several sources keeps whichever copy has the higher `seq`."},"createdBy":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","ready","active","finished","aborted"],"title":"GameStatus"},"access":{"type":"string","enum":["public","private","friends"],"title":"GameAccess"},"origin":{"type":"string","enum":["online","local"],"description":"Where a game is played. `online` is decided entirely by the server; `local` was played on the device against on-device bots and imported afterwards.","title":"GameOrigin"},"schemaVersion":{"type":"integer"},"config":{"type":"object"},"turnSeconds":{"type":["integer","null"]},"budgetSeconds":{"type":["integer","null"]},"incrementSeconds":{"type":["integer","null"]},"rated":{"type":"boolean"},"ratingPool":{"type":["string","null"]},"minPlayers":{"type":"integer"},"maxPlayers":{"type":"integer"},"shortCode":{"type":"string"},"pendingPlayers":{"type":["array","null"],"items":{"type":"integer"}},"turnDeadline":{"type":["integer","null"]},"outcomes":{"type":["array","null"],"items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"result":{"type":"string","enum":["win","loss","draw","eliminated"]},"placement":{"type":"integer"},"teamIndex":{"type":"integer"},"score":{"type":["number","null"]}},"required":["playerIndex","result","placement","teamIndex"],"title":"Outcome"}},"ratings":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"userId":{"type":["string","null"]},"botId":{"type":["string","null"]}},"required":["userId","botId"],"title":"RatingIdentity"},"pool":{"type":"string"},"muBefore":{"type":"number"},"sigmaBefore":{"type":"number"},"displayBefore":{"type":"integer"},"muAfter":{"type":"number"},"sigmaAfter":{"type":"number"},"displayAfter":{"type":"integer"},"displayChange":{"type":"integer"}},"required":["identity","pool","muBefore","sigmaBefore","displayBefore","muAfter","sigmaAfter","displayAfter","displayChange"],"title":"RatingDelta"}},"finishedAt":{"type":["integer","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"participants":{"type":"array","items":{"type":"object","properties":{"playerIndex":{"type":"integer"},"userId":{"type":["string","null"]},"botId":{"type":["string","null"]},"type":{"type":"string","enum":["human","bot"]}},"required":["playerIndex","userId","botId","type"],"title":"Seat"}}},"required":["id","seq","createdBy","status","access","origin","schemaVersion","config","turnSeconds","budgetSeconds","incrementSeconds","rated","ratingPool","minPlayers","maxPlayers","shortCode","pendingPlayers","turnDeadline","outcomes","finishedAt","createdAt","updatedAt","participants"],"title":"GameSummary"},"description":"With `finishedAfter`: the caller's games whose finish committed after that cursor, in commit order. Without it: the newest page of the caller's history, newest first."},"players":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"}},"required":["id","username","displayName","avatarUrl","isAnonymous"],"title":"Player"},"description":"The identity of every human seated in the games above."},"finishedCursor":{"type":"integer","description":"Pass as `finishedAfter` on the next sync."},"hasMoreFinished":{"type":"boolean","description":"More of the increment remains; sync again with `finishedCursor` straight away."},"historyFloor":{"type":["string","null"],"description":"Only on a sync without `finishedAfter`: pass as `cursor` to `getMyFinishedGames` for history older than `finishedGames`. Null when that page was the whole history, and always null on an incremental sync."}},"required":["account","ratings","friends","friendRequests","activeGames","finishedGames","players","finishedCursor","hasMoreFinished","historyFloor"],"title":"AccountSync"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"syncAccount","method":"get","path":"/api/engine/me/sync","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"sync Account","description":{"type":"text/plain"},"url":{"path":["api","engine","me","sync"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"finishedAfter","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/unblock-user.api.mdx b/web/docs/reference/http-api/unblock-user.api.mdx index a54c5cf2..d810f896 100644 --- a/web/docs/reference/http-api/unblock-user.api.mdx +++ b/web/docs/reference/http-api/unblock-user.api.mdx @@ -5,7 +5,7 @@ description: "unblockUser" sidebar_label: "unblockUser" hide_title: true hide_table_of_contents: true -api: {"operationId":"unblockUser","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Unblocked (idempotent)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"unblockUser","method":"delete","path":"/api/engine/friends/{userId}/block","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"unblock User","description":{"type":"text/plain"},"url":{"path":["api","engine","friends",":userId","block"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} +api: {"operationId":"unblockUser","tags":["Social"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Unblocked (idempotent)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"unblockUser","method":"delete","path":"/api/engine/friends/{userId}/block","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"unblock User","description":{"type":"text/plain"},"url":{"path":["api","engine","friends",":userId","block"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/unregister-device.api.mdx b/web/docs/reference/http-api/unregister-device.api.mdx index 974136b4..3b36f988 100644 --- a/web/docs/reference/http-api/unregister-device.api.mdx +++ b/web/docs/reference/http-api/unregister-device.api.mdx @@ -5,7 +5,7 @@ description: "unregisterDevice" sidebar_label: "unregisterDevice" hide_title: true hide_table_of_contents: true -api: {"operationId":"unregisterDevice","tags":["Me"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"fid","in":"path"}],"responses":{"204":{"description":"Deregistered (idempotent)"},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"unregisterDevice","method":"delete","path":"/api/engine/me/devices/{fid}","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"unregister Device","description":{"type":"text/plain"},"url":{"path":["api","engine","me","devices",":fid"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"fid"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} +api: {"operationId":"unregisterDevice","tags":["Me"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"fid","in":"path"}],"responses":{"204":{"description":"Deregistered (idempotent)"},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"unregisterDevice","method":"delete","path":"/api/engine/me/devices/{fid}","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"unregister Device","description":{"type":"text/plain"},"url":{"path":["api","engine","me","devices",":fid"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"fid"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/update-display-name.api.mdx b/web/docs/reference/http-api/update-display-name.api.mdx index 5bbebeb3..83d2138d 100644 --- a/web/docs/reference/http-api/update-display-name.api.mdx +++ b/web/docs/reference/http-api/update-display-name.api.mdx @@ -5,7 +5,7 @@ description: "updateDisplayName" sidebar_label: "updateDisplayName" hide_title: true hide_table_of_contents: true -api: {"operationId":"updateDisplayName","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":40}},"required":["displayName"],"title":"DisplayNameUpdate"}}}},"responses":{"200":{"description":"The caller's profile, with the new display name","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"}}}},"400":{"description":"Invalid display name","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"updateDisplayName","method":"put","path":"/api/engine/me/display-name","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"displayName":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"update Display Name","description":{"type":"text/plain"},"url":{"path":["api","engine","me","display-name"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"updateDisplayName","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":40}},"required":["displayName"],"title":"DisplayNameUpdate"}}}},"responses":{"200":{"description":"The caller's profile, with the new display name","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"}}}},"400":{"description":"Invalid display name","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"updateDisplayName","method":"put","path":"/api/engine/me/display-name","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"displayName":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"update Display Name","description":{"type":"text/plain"},"url":{"path":["api","engine","me","display-name"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "put api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/docs/reference/http-api/update-username.api.mdx b/web/docs/reference/http-api/update-username.api.mdx index a92c7712..a13e0730 100644 --- a/web/docs/reference/http-api/update-username.api.mdx +++ b/web/docs/reference/http-api/update-username.api.mdx @@ -5,7 +5,7 @@ description: "updateUsername" sidebar_label: "updateUsername" hide_title: true hide_table_of_contents: true -api: {"operationId":"updateUsername","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","minLength":3,"maxLength":20}},"required":["username"],"title":"UsernameUpdate"}}}},"responses":{"200":{"description":"The caller's profile, with the new username","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"}}}},"400":{"description":"Invalid username","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Username already taken","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"updateUsername","method":"put","path":"/api/engine/me/username","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"username":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.1","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"update Username","description":{"type":"text/plain"},"url":{"path":["api","engine","me","username"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} +api: {"operationId":"updateUsername","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","minLength":3,"maxLength":20}},"required":["username"],"title":"UsernameUpdate"}}}},"responses":{"200":{"description":"The caller's profile, with the new username","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"isAnonymous":{"type":"boolean"},"email":{"type":["string","null"]},"createdAt":{"type":"integer","description":"When this account was created. It changes only if the account was deleted and created again under the same id (a swept guest signing back in), so a client holding data for the account discards it when this differs."}},"required":["id","username","displayName","avatarUrl","isAnonymous","email","createdAt"],"title":"Profile"}}}},"400":{"description":"Invalid username","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}},"409":{"description":"Username already taken","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["notActive","notReady","expired","notPending","stateUpdated","invalidPayload","illegalMove","unknownGame","notJoinable","gameFull","alreadyJoined","notParticipant","notCreator","creatorCannotLeave","clientUpdateRequired","serverUpdateRequired","usernameInvalid","usernameTaken","friendsOnly","registrationRequired","capabilityRequired","contentRequired","commercialLimitReached","creationConflict","purchasePending","purchaseConflict","imageTooLarge","unsupportedImageType","rateLimited","invalidCursor","localOnly","notLocalBot"],"description":"A stable machine code identifying why a request failed.","title":"ErrorCode"}},"required":["error"],"title":"ErrorResponse"}}}}},"description":"updateUsername","method":"put","path":"/api/engine/me/username","security":[{"firebase":[]}],"securitySchemes":{"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Firebase ID token, sent as `Authorization: Bearer `."},"botHmac":{"type":"apiKey","in":"header","name":"Eigen-Signature","description":"An external bot's HMAC signature over the exact request body, bound to the `action` domain. Scheme `v1,`; the per-bot key is `HMAC(BOT_SIGNING_SECRET, botId)`. The engine signs wakes with the same header in the other direction."}},"jsonRequestBodyExample":{"username":"string"},"info":{"title":"EigenInteractive Engine API","version":"0.12.2","description":"The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated."},"postman":{"name":"update Username","description":{"type":"text/plain"},"url":{"path":["api","engine","me","username"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "put api-method" info_path: docs/reference/http-api/eigeninteractive-engine-api custom_edit_url: null diff --git a/web/static/openapi.json b/web/static/openapi.json index 034ed4b8..dc2a2a79 100644 --- a/web/static/openapi.json +++ b/web/static/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "EigenInteractive Engine API", - "version": "0.12.1", + "version": "0.12.2", "description": "The server-authoritative game engine API. Client routes (`/api/engine/*`) require a Firebase ID token; the external-bot webhook (`/api/bot/action`) is HMAC-authenticated." }, "tags": [