From 13f1fcc3714b840c81a2311fb37f9bdfcf1aa881 Mon Sep 17 00:00:00 2001 From: "eigen-release[bot]" <311780374+eigen-release[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 12:27:30 +0000 Subject: [PATCH] Version npm packages --- dart/eigen_client/pubspec.yaml | 2 +- flutter/pubspec.yaml | 2 +- server/.changeset/complete-recipient-sessions.md | 8 -------- server/.changeset/scaffold-pins.md | 10 ---------- server/.changeset/typed-database-queries.md | 5 ----- server/clients/dart/CHANGELOG.md | 2 +- server/clients/dart/README.md | 2 +- server/clients/dart/pubspec.yaml | 2 +- server/packages/create-eigen-game/CHANGELOG.md | 15 +++++++++++++++ server/packages/create-eigen-game/package.json | 2 +- server/packages/kernel/CHANGELOG.md | 7 +++++++ server/packages/kernel/package.json | 2 +- server/packages/rules/CHANGELOG.md | 4 ++++ server/packages/rules/package.json | 2 +- server/packages/server/CHANGELOG.md | 13 +++++++++++++ server/packages/server/openapi.json | 2 +- server/packages/server/package.json | 2 +- server/packages/testkit/CHANGELOG.md | 8 ++++++++ server/packages/testkit/package.json | 2 +- web/api/openapi.json | 2 +- .../http-api/accept-friend-request.api.mdx | 2 +- web/docs/reference/http-api/add-bot.api.mdx | 2 +- .../http-api/append-local-transitions.api.mdx | 2 +- web/docs/reference/http-api/block-user.api.mdx | 2 +- web/docs/reference/http-api/bot-action.api.mdx | 2 +- web/docs/reference/http-api/cancel-game.api.mdx | 2 +- .../http-api/claim-commerce-purchase.api.mdx | 2 +- .../http-api/create-commerce-checkout.api.mdx | 2 +- .../http-api/create-commerce-management.api.mdx | 2 +- web/docs/reference/http-api/create-game.api.mdx | 2 +- .../reference/http-api/create-local-game.api.mdx | 2 +- .../http-api/create-socket-ticket.api.mdx | 2 +- .../reference/http-api/create-solo-game.api.mdx | 2 +- .../reference/http-api/delete-account.api.mdx | 2 +- .../http-api/eigeninteractive-engine-api.info.mdx | 2 +- web/docs/reference/http-api/forfeit-game.api.mdx | 2 +- web/docs/reference/http-api/get-bots.api.mdx | 2 +- .../http-api/get-commerce-access.api.mdx | 2 +- .../http-api/get-commerce-catalog.api.mdx | 2 +- web/docs/reference/http-api/get-frames.api.mdx | 2 +- .../reference/http-api/get-friends-games.api.mdx | 2 +- .../reference/http-api/get-game-session.api.mdx | 2 +- web/docs/reference/http-api/get-game.api.mdx | 2 +- web/docs/reference/http-api/get-health.api.mdx | 2 +- web/docs/reference/http-api/get-lobby.api.mdx | 2 +- .../reference/http-api/get-local-record.api.mdx | 2 +- .../http-api/get-my-finished-games.api.mdx | 2 +- .../reference/http-api/get-player-games.api.mdx | 2 +- .../reference/http-api/get-player-ratings.api.mdx | 2 +- web/docs/reference/http-api/get-players.api.mdx | 2 +- web/docs/reference/http-api/get-profile.api.mdx | 2 +- .../reference/http-api/join-game-by-code.api.mdx | 2 +- web/docs/reference/http-api/join-game.api.mdx | 2 +- web/docs/reference/http-api/leave-game.api.mdx | 2 +- .../reference/http-api/register-device.api.mdx | 2 +- web/docs/reference/http-api/remove-friend.api.mdx | 2 +- .../http-api/restore-commerce-purchases.api.mdx | 2 +- web/docs/reference/http-api/search-users.api.mdx | 2 +- .../http-api/send-friend-request.api.mdx | 2 +- web/docs/reference/http-api/start-game.api.mdx | 2 +- web/docs/reference/http-api/submit-action.api.mdx | 2 +- web/docs/reference/http-api/sync-account.api.mdx | 2 +- web/docs/reference/http-api/unblock-user.api.mdx | 2 +- .../reference/http-api/unregister-device.api.mdx | 2 +- .../http-api/update-display-name.api.mdx | 2 +- .../reference/http-api/update-username.api.mdx | 2 +- web/static/openapi.json | 2 +- 67 files changed, 106 insertions(+), 82 deletions(-) delete mode 100644 server/.changeset/complete-recipient-sessions.md delete mode 100644 server/.changeset/scaffold-pins.md delete mode 100644 server/.changeset/typed-database-queries.md diff --git a/dart/eigen_client/pubspec.yaml b/dart/eigen_client/pubspec.yaml index d9304079..78045326 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.0 + eigen_api: ^0.12.1 json_annotation: ^4.12.0 web_socket_channel: ^3.0.3 diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 6b779c32..b93a6984 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.0 + eigen_api: ^0.12.1 dio: ^5.10.0 dio_smart_retry: ^7.0.1 web: ^1.1.2 diff --git a/server/.changeset/complete-recipient-sessions.md b/server/.changeset/complete-recipient-sessions.md deleted file mode 100644 index af9f6902..00000000 --- a/server/.changeset/complete-recipient-sessions.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@eigeninteractive/server": patch -"create-eigen-game": patch ---- - -Return complete sessions projected for the authenticated recipient on every accepted command, including starts and offline bot transitions. Preserve outcomes on rating transitions so HTTP, socket and cold reads agree at the same sequence. Remove the redundant solo-start read. - -Update scaffold dependencies, use Workbox's supported Node build API without the vulnerable CLI watcher dependency, and let Pub resolve the Firebase Core version compatible with the selected adapter. diff --git a/server/.changeset/scaffold-pins.md b/server/.changeset/scaffold-pins.md deleted file mode 100644 index 195a595c..00000000 --- a/server/.changeset/scaffold-pins.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"create-eigen-game": patch ---- - -Install the newly released Dart packages in a scaffolded app. - -- `eigen_codegen` ^0.2.0 -- `eigen_flutter` ^0.17.0 -- `eigen_shell` ^0.8.0 -- `eigen_firebase` ^0.7.0 diff --git a/server/.changeset/typed-database-queries.md b/server/.changeset/typed-database-queries.md deleted file mode 100644 index f4dee7ff..00000000 --- a/server/.changeset/typed-database-queries.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@eigeninteractive/server": patch ---- - -Use typed Drizzle predicates, aggregates, and subqueries for user search, relationship sync, revision guards, and commercial quota allocation. Keep quota checks and slot allocation inside the same database statement and batch transaction. diff --git a/server/clients/dart/CHANGELOG.md b/server/clients/dart/CHANGELOG.md index 23a24058..8b11a020 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.0 here is 0.12.0 there. It has no changes of its own. +exactly: 0.12.1 here is 0.12.1 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 028d8b05..924b8196 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.0 +- API version: 0.12.1 - 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 e011ab93..9707814e 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.0 +version: 0.12.1 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 54ff82b1..df16e02b 100644 --- a/server/packages/create-eigen-game/CHANGELOG.md +++ b/server/packages/create-eigen-game/CHANGELOG.md @@ -1,5 +1,20 @@ # create-eigen-game +## 0.17.8 + +### Patch Changes + +- [#147](https://github.com/eigeninteractive/eigen-platform/pull/147) [`9ccdb0e`](https://github.com/eigeninteractive/eigen-platform/commit/9ccdb0ee5d64b85f6a32a1d02b488f70bc8a5bbe) Thanks [@seenu-k](https://github.com/seenu-k)! - Return complete sessions projected for the authenticated recipient on every accepted command, including starts and offline bot transitions. Preserve outcomes on rating transitions so HTTP, socket and cold reads agree at the same sequence. Remove the redundant solo-start read. + + Update scaffold dependencies, use Workbox's supported Node build API without the vulnerable CLI watcher dependency, and let Pub resolve the Firebase Core version compatible with the selected adapter. + +- [#150](https://github.com/eigeninteractive/eigen-platform/pull/150) [`fd29ed0`](https://github.com/eigeninteractive/eigen-platform/commit/fd29ed098911fd9af849afe788122fb6e6c36a82) Thanks [@eigen-release](https://github.com/apps/eigen-release)! - Install the newly released Dart packages in a scaffolded app. + + - `eigen_codegen` ^0.2.0 + - `eigen_flutter` ^0.17.0 + - `eigen_shell` ^0.8.0 + - `eigen_firebase` ^0.7.0 + ## 0.17.7 ### Patch Changes diff --git a/server/packages/create-eigen-game/package.json b/server/packages/create-eigen-game/package.json index ca85bac4..73c48fa9 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.7", + "version": "0.17.8", "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 2e1aa542..d877b5b1 100644 --- a/server/packages/kernel/CHANGELOG.md +++ b/server/packages/kernel/CHANGELOG.md @@ -1,5 +1,12 @@ # @eigeninteractive/kernel +## 0.12.1 + +### Patch Changes + +- Updated dependencies []: + - @eigeninteractive/rules@0.12.1 + ## 0.12.0 ### Patch Changes diff --git a/server/packages/kernel/package.json b/server/packages/kernel/package.json index 26279091..9ed41d4a 100644 --- a/server/packages/kernel/package.json +++ b/server/packages/kernel/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/kernel", - "version": "0.12.0", + "version": "0.12.1", "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 b6b0832d..9889ef62 100644 --- a/server/packages/rules/CHANGELOG.md +++ b/server/packages/rules/CHANGELOG.md @@ -1,5 +1,9 @@ # @eigeninteractive/rules +## 0.12.1 + +No changes in this release. + ## 0.12.0 No changes in this release. diff --git a/server/packages/rules/package.json b/server/packages/rules/package.json index 15d48a0c..67165fee 100644 --- a/server/packages/rules/package.json +++ b/server/packages/rules/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/rules", - "version": "0.12.0", + "version": "0.12.1", "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 e85ce257..b72be5f8 100644 --- a/server/packages/server/CHANGELOG.md +++ b/server/packages/server/CHANGELOG.md @@ -1,5 +1,18 @@ # @eigeninteractive/server +## 0.12.1 + +### Patch Changes + +- [#147](https://github.com/eigeninteractive/eigen-platform/pull/147) [`9ccdb0e`](https://github.com/eigeninteractive/eigen-platform/commit/9ccdb0ee5d64b85f6a32a1d02b488f70bc8a5bbe) Thanks [@seenu-k](https://github.com/seenu-k)! - Return complete sessions projected for the authenticated recipient on every accepted command, including starts and offline bot transitions. Preserve outcomes on rating transitions so HTTP, socket and cold reads agree at the same sequence. Remove the redundant solo-start read. + + Update scaffold dependencies, use Workbox's supported Node build API without the vulnerable CLI watcher dependency, and let Pub resolve the Firebase Core version compatible with the selected adapter. + +- [#147](https://github.com/eigeninteractive/eigen-platform/pull/147) [`9ccdb0e`](https://github.com/eigeninteractive/eigen-platform/commit/9ccdb0ee5d64b85f6a32a1d02b488f70bc8a5bbe) Thanks [@seenu-k](https://github.com/seenu-k)! - Use typed Drizzle predicates, aggregates, and subqueries for user search, relationship sync, revision guards, and commercial quota allocation. Keep quota checks and slot allocation inside the same database statement and batch transaction. +- Updated dependencies []: + - @eigeninteractive/kernel@0.12.1 + - @eigeninteractive/rules@0.12.1 + ## 0.12.0 ### Patch Changes diff --git a/server/packages/server/openapi.json b/server/packages/server/openapi.json index 0f0782f8..034ed4b8 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.0", + "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." }, "tags": [ diff --git a/server/packages/server/package.json b/server/packages/server/package.json index ab7b27e7..c68e6222 100644 --- a/server/packages/server/package.json +++ b/server/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/server", - "version": "0.12.0", + "version": "0.12.1", "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 702242ea..b4181e6f 100644 --- a/server/packages/testkit/CHANGELOG.md +++ b/server/packages/testkit/CHANGELOG.md @@ -1,5 +1,13 @@ # @eigeninteractive/testkit +## 0.12.1 + +### Patch Changes + +- Updated dependencies []: + - @eigeninteractive/kernel@0.12.1 + - @eigeninteractive/rules@0.12.1 + ## 0.12.0 ### Minor Changes diff --git a/server/packages/testkit/package.json b/server/packages/testkit/package.json index 49374e5a..bdf717a8 100644 --- a/server/packages/testkit/package.json +++ b/server/packages/testkit/package.json @@ -1,6 +1,6 @@ { "name": "@eigeninteractive/testkit", - "version": "0.12.0", + "version": "0.12.1", "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 0f0782f8..034ed4b8 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.0", + "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." }, "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 a122f717..9d189e2b 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.0","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.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"}} 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 f2e5f643..c9262c64 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.0","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.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"}}}}} 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 5a5ffaa8..aaf24121 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.0","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.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"}}}}} 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 68e9f67b..0d5a1c70 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.0","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.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"}} 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 c79a9bc6..753356f6 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.0","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.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"}]}}} 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 a4441d71..446eaacc 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.0","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.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"}} 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 efc12ab9..1fd6e8f1 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.0","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.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"}}}}} 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 a712a538..8534a826 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.0","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.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"}}}}} 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 1f8cba89..9797ccc4 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.0","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.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"}}}}} 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 9477307c..8d4f9ab7 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.0","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.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"}}}}} 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 23ee54df..8f0ceb08 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.0","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.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"}}}}} 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 e91ee163..0a3f24b4 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.0","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.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"}} 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 3c906a63..04a854d4 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.0","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.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"}}}}} 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 e60f7a06..d28d49f2 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.0","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.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"}} 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 cb81dca0..14e72f74 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 a9d9520c..6a073072 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.0","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.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"}}}}} 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 77388338..fd6bd0c6 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.0","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.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"}} 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 27b113bd..57abeb41 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.0","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.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"}} 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 570ae6b0..756d8ad2 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.0","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.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"}} 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 89a3fec3..bcf9308b 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.0","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.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"}} 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 df2b2d5a..0ac2add8 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.0","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.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"}} 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 4bd39d48..a8ae5a45 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.0","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.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"}} 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 2887967c..03ed414c 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.0","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.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"}} 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 b8729a70..49c994c7 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.0","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.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"}} 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 5989584e..7eca33cb 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.0","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.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"}} 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 2317f59b..fe382e4f 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.0","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.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"}} 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 52467064..6b5b3726 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.0","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.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"}} 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 b60335f6..e289d716 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.0","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.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"}} 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 ff869097..4adbc464 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.0","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.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"}} 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 d69791e0..232c9d74 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.0","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.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"}} 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 409a2f19..93da1ec9 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.0","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.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"}} 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 6b52f896..caacbfe7 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.0","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.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"}}}}} 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 824fdff1..80c641ee 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.0","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.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"}}}}} 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 f65143ad..78d64e34 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.0","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.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"}} 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 1ef85312..6ab3d00b 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.0","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.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"}}}}} 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 7b3e1ae9..05267d19 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.0","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.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"}} 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 f47328e4..7b79c62b 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.0","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.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"}}}}} 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 d402fc0c..c59bc64b 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.0","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.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"}} 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 644220ad..97efefe3 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.0","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.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"}}}}} 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 bbb5b039..ce210bcd 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.0","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.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"}} 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 dead4a09..46983fea 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.0","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.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"}}}}} 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 5dcf563b..b2ed065b 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.0","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.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"}} 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 542b0686..a54c5cf2 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.0","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.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"}} 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 1135a06b..974136b4 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.0","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.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"}} 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 dcd6d5a1..5bbebeb3 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.0","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.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"}}}}} 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 67556255..a92c7712 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.0","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.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"}}}}} 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 0f0782f8..034ed4b8 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.0", + "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." }, "tags": [