@faiber/faiber-state-sdk 0.23.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,33 +1,53 @@
1
1
  # @faiber/faiber-state-sdk
2
2
 
3
- TypeScript client for Infera State worlds, rooms, authoritative state, WASM endpoints, realtime replication, and client prediction.
3
+ Typed State worlds, rooms, WASM export bindings, server-authoritative games and ticket-authenticated WebSockets.
4
4
 
5
5
  ```bash
6
- npm install @faiber/faiber-ts-sdk
6
+ npm install @faiber/faiber-state-sdk
7
7
  ```
8
8
 
9
9
  ```ts
10
- const ticket = (await faiber.state.join(roomId, userId)).data.data;
10
+ import { FaiberClient } from "@faiber/sdk-core";
11
+ import { StateApi, StateRealtimeClient } from "@faiber/faiber-state-sdk";
12
+
13
+ const state = new StateApi(new FaiberClient("state", {
14
+ domains: { state: "https://state.example.com" },
15
+ authMode: "cookie",
16
+ }));
17
+ const options = { headers: { "x-organization-id": organizationId }, signal };
18
+ const world = await state.createWorld({ name: "Arena", slug: "arena" }, options);
19
+ const room = await state.createRoom(world.data.data.id, { name: "Room 1", capacity: 8 }, options);
20
+ const ticket = (await state.join(room.data.data.id, userId, options)).data.data;
11
21
  const realtime = new StateRealtimeClient(ticket);
12
22
  realtime.on("patch", patch => applyServerPatch(patch));
23
+ realtime.on("pong", ({ tick }) => observeServerTick(tick));
13
24
  await realtime.connect();
14
- realtime.sendInput({ move_x: 5, move_z: -1 }, "unreliable");
25
+ realtime.sendInput({ move_x: 5, move_z: -1 });
26
+ // On leaving the room:
27
+ realtime.close();
15
28
  ```
16
29
 
17
- Browsers use the reliable WebSocket channel by default. Native mobile/desktop hosts can inject a `DatagramTransport` for UDP or QUIC traffic. `PredictionBuffer` replays unacknowledged input after each authoritative patch.
30
+ Use secure HttpOnly cookies with `withCredentials`, or configure `FaiberClient` with a `TokenProvider` that supplies an in-memory Bearer token. Every HTTP call preserves the full Axios response, options, errors and cancellation signal. Catch Axios errors for validation (400/422), missing records (404), permission failures (401/403), conflicts (409), and transport failures. Aborting `signal` cancels HTTP requests. The complete facade is available as [`@faiber/faiber-ts-sdk`](https://www.npmjs.com/package/@faiber/faiber-ts-sdk).
18
31
 
19
- All HTTP methods use the shared `FaiberClient`, so Bearer tokens and secure-cookie credentials,
20
- Axios errors, cancellation signals, and custom request options are preserved. The realtime socket
21
- authenticates with the short-lived ticket returned by the authorized `join` call.
32
+ v1 world/room/WASM operations require an authenticated user, a non-nil `x-organization-id` UUID, and `state:read`, `state:write`, or `state:execute` as documented per operation. State management, wildcard and admin aliases are also accepted. Joining/invoking for another user requires management authority. Managed game worlds expose `managed: true` and reject update/deletion with 409. All v1 and v2 success responses use `{ data }`.
22
33
 
23
- ### Versioned games and match realtime
34
+ Browsers carry room input over WebSocket. Native hosts can inject `DatagramTransport` for the JSON UDP input gateway; each datagram includes the scoped room ticket. `acked` UDP delivery returns an acknowledgement. The room ticket expires after five minutes and is checked at upgrade; rejoining obtains a new player and ticket. `close()` stops retries. The backend may deliver a patch both as an input response and broadcast; consumers should track entity revisions/sequences. `PredictionBuffer` can replay pending inputs after authoritative updates.
24
35
 
25
- The generated operations also cover v2 game catalogs, sessions, commands, invite lobbies, progress, matchmaking and connection tickets. v1 and v2 return `{data}` envelopes. Game request/response fields use camelCase; commands include a stable command UUID and the expected state version. Stale versions return 409. The registered ruleset determines board and challenge JSON payloads.
36
+ The generated `state.operations` covers all mounted HTTP APIs and both WebSocket upgrades. v2 game catalog reads are public; protected game operations require `state:execute` and applicable owner/member checks. The SQL game runtime uses the tenant configured on the service. Game-operations summary, economy, session pages and event pages have named response models. Their query keys use snake_case (`page_size`, `settlement_status`, `user_id`); returned page metadata uses camelCase. Session pages default to 25 entries, event pages to 50, and both clamp sizes to 10–100.
26
37
 
27
38
  ```ts
28
- const created = await faiber.state.operations.gamesRoutesCreateSessionPost(gameId, { difficulty: "11-14", paid: false });
29
- const connected = await faiber.state.operations.kheradgahRoutesConnectionPost(matchId);
30
- const socket = await faiber.state.operations.connectMatchRealtime(connected.data.data, { signal });
39
+ const created = await state.operations.gamesRoutesCreateSessionPost(gameId, {
40
+ difficulty: "11-14", paid: false,
41
+ }, { signal });
42
+ const page = await state.operations.routesGameOperationSessionsGet({
43
+ page: 1, page_size: 25, paid: false,
44
+ }, options);
45
+ const connection = await state.createMatchConnection(matchId, { signal });
46
+ const socket = await state.operations.connectMatchRealtime(connection.data.data, { signal });
31
47
  ```
32
48
 
33
- Protected HTTP operations inherit the configured token/cookie transport and require `state:execute`. `connectMatchRealtime` performs the WebSocket upgrade, validates the configured State origin and sends the 30-second one-use ticket in the initial hello frame. Acquire a new ticket after reconnecting. `routesRealtimeGet` opens v1 room replication using a scoped `JoinTicket`. WebSocket operations return a connected socket/client; HTTP operations preserve complete Axios responses.
49
+ Game commands include a stable command UUID and the expected state version. Stale HTTP game versions return 409; match WebSocket command rejection uses a `command_result` frame and a fresh snapshot. Board, challenge, metrics, event payloads and game answer/action JSON deliberately vary by registered game/ruleset and are documented as `GamePayload`; component/input JSON varies by authored world schema.
50
+
51
+ `connectMatchRealtime` validates the configured service origin and sends a 30-second one-use connection ticket in the initial hello frame within five seconds. Acquire a fresh ticket after reconnecting. `MatchRealtimeClient` automatically reconnects only when supplied `refreshTicket`; a consumed ticket cannot be reused. The server validates allowed browser Origins. `routesRealtimeGet(ticket, { signal })` opens v1 room replication against the configured service origin. Socket operations return a connected WebSocket/client.
52
+
53
+ `health()` and `operations.mainProcessHealthGet()` read the static `/health` advertisement (`service`, `status`, `transports`, `rulesets`, `wasm`). This advertises WebSocket and `kheradgah.v1`; it does not verify database, gameplay, persistence, gateway or WebSocket readiness.
package/dist/.tsbuildinfo CHANGED
@@ -1 +1 @@
1
- {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/axios/index.d.ts","../../core/dist/types.d.ts","../../core/dist/env.d.ts","../../core/dist/auth.d.ts","../../core/dist/client.d.ts","../../core/dist/resource.d.ts","../../core/dist/openapi.d.ts","../../core/dist/realtime.d.ts","../../core/dist/index.d.ts","../src/types.ts","../src/realtime.ts","../src/contracts.types.ts","../src/operations.types.ts","../src/match-realtime.ts","../src/operations.ts","../src/match.ts","../src/api.ts","../src/prediction.ts","../src/index.ts"],"fileIdsList":[[61],[60,61],[60,61,62,63,64,65,66,67],[60,61,64],[60],[68,69,74,75],[68,70],[69,70,71,72,74,75,76,77],[68,69,70,71],[68,69,71,72,73],[68,69,71],[69],[68]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2343ec253c90c370449755739733f5f429f58cffdb51a50977bb4a042012fa8f","impliedFormat":99},{"version":"6cc1f17dc5454eb1112cfb4a2e2ddc93de8c3f9016c8db7bdf0328caac374ffa","impliedFormat":99},{"version":"82065c5512d8d6f81b26cf13ea9ecd3e558be9560f7b5c62260858219ecd87f7","impliedFormat":99},{"version":"ed17ed1b2bcf384c88bc6cec6b427989b98db99fc7ad35a50605501a463bbc53","impliedFormat":99},{"version":"82bf4efcca8ab8764a91ac126c0af605ab6717ee94b2316461b5fa388b27e165","impliedFormat":99},{"version":"74d1d74d5dadbbb70e8e294d3419c58885629a9fc95141cbf158a3febb523300","impliedFormat":99},{"version":"3f5eeb0a84713ccf640b9a6af4629e006f59d7629abc3fc95af2efb062fd0b83","impliedFormat":99},{"version":"ac62f6b0f2e963ea9a251ee8384e64cebe0fe4acd32ca177d838d7c5a7ad2b43","impliedFormat":99},{"version":"fdd1b5a8a2b98f82c94e4dc4e3b207ca81766b656d23acd3c7458fffd9af21dd","impliedFormat":99},{"version":"e734246e8b37931b681daee43684685451d19dd45a80ec862db52ac652056cbd","signature":"eee6ef91281384431e91536e51ba2c4316f63eb0a65614ce8c6b6c88d30b3def","impliedFormat":99},{"version":"932fe992ca283174320af6d550cceb10d86cf1309130f20099f695dd062b0f16","signature":"6d4dea0a46463c93a6a7b918af4e93b6374e3aa8f948e26a16efc744335a355c","impliedFormat":99},{"version":"a6d112ed1813768d7e2680ba7b386ff904a0545700b06c8fa2a9c662e153355c","signature":"b917331d187a5230d50c3a6887dac4f5d5b4af998a3e59f63350eb7b0000a857","impliedFormat":99},{"version":"cdf297d0fe2be21bf5264d9361e9fa8669026ee59b09e6cba1a5513b35b3c30d","signature":"d38015fc3d50ba5e2f0e817dacbd2dca491f07947859d5cc3ddc80fcd993a5f5","impliedFormat":99},{"version":"575074eeef66f16a4b3b65a7a76e87c43772b347fc11d9a9477e31acca850169","signature":"9d04bb51727b5bdce98e39826333f523c99780ef7b5cf77f382707e05cff15d7","impliedFormat":99},{"version":"354e7ca5dd4e91651e51ed8ae782ff646798260d209abf86cc441c00e3486692","signature":"dc68dc5dfdf1005bd4c2704ed0efa70cad8d96b1cda2b841edb5d9587e4f2b58","impliedFormat":99},{"version":"6b5056f911cb098a924aa25ad5c24ce2ad517804e92efffbd608583e57f18610","signature":"fcfc7b62d3b938a46fd19ac320b8ddf0ef5557b3cf1ea59ee86b1c7df88ae91a","impliedFormat":99},{"version":"1b4729e2b09a44e9caed86301cc32ed9dc7c61dafa44ea0700932a5e9726e188","signature":"0e6020a621852f4802e6426b0c4e983cd067331e1c5af6d95fb61d856bb07f4e","impliedFormat":99},{"version":"408a1f9df47e527c6dcff25d2c2cbef9d04186ea643d055704ccc54016bc0732","signature":"9960b39e2a2cf4d4b3b843ce69c83ed77a89cab83ade288d57c1677baf18fbab","impliedFormat":99},{"version":"a52f5b3e8f9240d2c9e29625b4a3c7348a0f2c251c47f8e1cc31621b5faddfef","signature":"55e430c42123fb403a223a630d826fdc9a3cc1a7a64c93f08e5fbde6f332e5f1","impliedFormat":99}],"root":[[69,78]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[63,1],[64,2],[62,1],[68,3],[66,4],[65,4],[61,5],[76,6],[71,7],[78,8],[73,9],[74,10],[72,11],[77,12],[70,12],[69,13]],"latestChangedDtsFile":"./api.d.ts","version":"5.9.3"}
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/axios/index.d.ts","../../core/dist/types.d.ts","../../core/dist/env.d.ts","../../core/dist/auth.d.ts","../../core/dist/client.d.ts","../../core/dist/resource.d.ts","../../core/dist/openapi.d.ts","../../core/dist/realtime.d.ts","../../core/dist/summary-access.d.ts","../../core/dist/index.d.ts","../src/types.ts","../src/realtime.ts","../src/match.ts","../src/contracts.types.ts","../src/operations.types.ts","../src/match-realtime.ts","../src/operations.ts","../src/api.ts","../src/prediction.ts","../src/index.ts"],"fileIdsList":[[61],[60,61],[60,61,62,63,64,65,66,67,68],[60,61,64],[60],[69,70,72,73,76],[69,71,72],[70,71,72,73,74,76,77,78],[69,70,71,73],[73],[69,70,73,74,75],[69,70,73],[70],[69,73]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2368a31d44ccc59758e3b3c682fee74e820b08fad98623905a85092018c06e3b","impliedFormat":99},{"version":"61806e75fc22177d65d9b33c90c4b88e4370abd4dd88d8196ca0fc87d7702fe9","impliedFormat":99},{"version":"82065c5512d8d6f81b26cf13ea9ecd3e558be9560f7b5c62260858219ecd87f7","impliedFormat":99},{"version":"ed17ed1b2bcf384c88bc6cec6b427989b98db99fc7ad35a50605501a463bbc53","impliedFormat":99},{"version":"82bf4efcca8ab8764a91ac126c0af605ab6717ee94b2316461b5fa388b27e165","impliedFormat":99},{"version":"e8345259c97aa6b8a84b27963fff00e79b7f45852b0024fffc52c9a7949007ac","impliedFormat":99},{"version":"3f5eeb0a84713ccf640b9a6af4629e006f59d7629abc3fc95af2efb062fd0b83","impliedFormat":99},{"version":"ac62f6b0f2e963ea9a251ee8384e64cebe0fe4acd32ca177d838d7c5a7ad2b43","impliedFormat":99},{"version":"967088f3793139562bc3fd0e5db990a8bc2885f7444a1f10ea6a5a6479fa6d40","impliedFormat":99},{"version":"6756b343720142c0f4f0c62b8194eefdea2d1774da6f7902bee9e39d4e81c9d4","impliedFormat":99},{"version":"477ce94cdc645f6684d852c6d78986a41f41ef71869861bb4f246833d317bfcc","signature":"991674426254b94e837422ca5183e7eb411ef1ae0929ead656ea46ce316edaf6","impliedFormat":99},{"version":"19113d0e2f142ea64f406b05a53dba7ce709220ca5ab6c8c730236c71f287523","signature":"1013bb3bf223bf5aefd19afb71d0f78f51c40b166f9f36c2beac374f659a68db","impliedFormat":99},{"version":"f7c7c7629d6471d8ab9c9bde9ae43aeccd672e7d722e7044ce6c8836f199589d","signature":"352edca374a3315f5d4908310940ffbb4601b87c7da3f6448daa8492ae15ac3d","impliedFormat":99},{"version":"0cb0cccc03db2984ac46309723c9dc49bd604ff434f6c165148e615a18111206","signature":"cb84749ef4fcc2248ef4d6ed5c8692efc5d0eb1f9857713d99e4f4a7050cbf06","impliedFormat":99},{"version":"5eeb370c8edaba7153284462d55753f1082c3305cd8ce821777af98e536d7e29","signature":"f8e562fb120679d56d212a077f58beae77fd16155b850bfee9419584b5345991","impliedFormat":99},{"version":"575074eeef66f16a4b3b65a7a76e87c43772b347fc11d9a9477e31acca850169","signature":"9d04bb51727b5bdce98e39826333f523c99780ef7b5cf77f382707e05cff15d7","impliedFormat":99},{"version":"bba5d2c75787bae2454b54a9c225e37a51411b02be8de8e5d3c51db6a486d44b","signature":"8e3a159d09d493597fa4fa22ce7a3c584dc8443b23a1b21a320ad5a0ac785f36","impliedFormat":99},{"version":"b04499f0f5afd47a67d8be9c473ce690065f577f39ce19f0c36820483b75917c","signature":"58316640672e24bfea0181c287bc80c30ef4d0c72addf5f30c086b3732e83505","impliedFormat":99},{"version":"408a1f9df47e527c6dcff25d2c2cbef9d04186ea643d055704ccc54016bc0732","signature":"9960b39e2a2cf4d4b3b843ce69c83ed77a89cab83ade288d57c1677baf18fbab","impliedFormat":99},{"version":"a52f5b3e8f9240d2c9e29625b4a3c7348a0f2c251c47f8e1cc31621b5faddfef","signature":"55e430c42123fb403a223a630d826fdc9a3cc1a7a64c93f08e5fbde6f332e5f1","impliedFormat":99}],"root":[[70,79]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[63,1],[64,2],[62,1],[69,3],[66,4],[65,4],[61,5],[77,6],[73,7],[79,8],[75,9],[72,10],[76,11],[74,12],[78,13],[71,13],[70,14]],"latestChangedDtsFile":"./operations.d.ts","version":"5.9.3"}
package/dist/api.d.ts CHANGED
@@ -4,61 +4,43 @@ import type * as T from "./types.js";
4
4
  /** REST control plane for authoritative realtime worlds. Every route requires the shared IDP-authorized organization context. */
5
5
  export declare class StateApi extends ServiceApi {
6
6
  readonly operations: StateOperations;
7
- /** Checks State runtime readiness via `GET /health`. @returns Full Axios response with transport and WASM capability state. @throws AxiosError for unavailable or failed transport responses. */
8
- health(options?: RequestOptions): Promise<import("axios").AxiosResponse<T.StateHealthResponse, any, {}>>;
7
+ /** Reads the static State process advertisement via `GET /health`. @returns Full Axios response with advertised transports, rulesets and WASM support; no downstream readiness guarantee. @throws AxiosError for unavailable or failed transport responses. */
8
+ health(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./contracts.types.js").StateProcessHealthResponse, any, {}, any>>;
9
9
  /** Lists visible worlds via `GET /api/v1/worlds`. @returns Full Axios response with typed worlds. @throws AxiosError for authentication, authorization, or transport failures. */
10
- worlds(options?: RequestOptions): Promise<import("axios").AxiosResponse<T.WorldListResponse, any, {}>>;
10
+ worlds(options?: RequestOptions): Promise<import("axios").AxiosResponse<T.WorldListResponse, any, {}, any>>;
11
11
  /** Gets a world via `GET /api/v1/worlds/{id}`. @param id World UUID. @returns Full typed Axios response. @throws AxiosError for unauthorized, not-found, or transport failures. */
12
- world(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.WorldResponse, any, {}>>;
12
+ world(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.WorldResponse, any, {}, any>>;
13
13
  /** Creates a world via `POST /api/v1/worlds`. @param data Typed world schema and optional runtime configuration. @returns Full typed Axios response. @throws AxiosError for validation, authorization, or transport failures. */
14
- createWorld(data: T.CreateWorldInput, options?: RequestOptions<T.CreateWorldInput>): Promise<import("axios").AxiosResponse<T.WorldResponse, T.CreateWorldInput, {}>>;
14
+ createWorld(data: T.CreateWorldInput, options?: RequestOptions<T.CreateWorldInput>): Promise<import("axios").AxiosResponse<T.WorldResponse, T.CreateWorldInput, {}, any>>;
15
15
  /** Updates mutable world configuration via `PUT /api/v1/worlds/{id}`. @param id World UUID. @param data Typed partial update. @returns Full typed Axios response. @throws AxiosError for validation, not-found, authorization, or transport failures. */
16
- updateWorld(id: string, data: T.UpdateWorldInput, options?: RequestOptions<T.UpdateWorldInput>): Promise<import("axios").AxiosResponse<T.WorldResponse, T.UpdateWorldInput, {}>>;
16
+ updateWorld(id: string, data: T.UpdateWorldInput, options?: RequestOptions<T.UpdateWorldInput>): Promise<import("axios").AxiosResponse<T.WorldResponse, T.UpdateWorldInput, {}, any>>;
17
17
  /** Lists rooms via `GET /api/v1/worlds/{worldId}/rooms`. @param worldId World UUID. @returns Full Axios response with typed rooms. @throws AxiosError for authorization, not-found, or transport failures. */
18
- rooms(worldId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.RoomListResponse, any, {}>>;
18
+ rooms(worldId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.RoomListResponse, any, {}, any>>;
19
19
  /** Gets an authoritative room snapshot via `GET /api/v1/rooms/{id}`. @param id Room UUID. @returns Full typed Axios response. @throws AxiosError for authorization, not-found, or transport failures. */
20
- room(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.RoomResponse, any, {}>>;
20
+ room(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.RoomResponse, any, {}, any>>;
21
21
  /** Creates a room via `POST /api/v1/worlds/{worldId}/rooms`. @param worldId World UUID. @param data Name and optional capacity. @returns Full typed Axios response. @throws AxiosError for validation, authorization, not-found, or transport failures. */
22
- createRoom(worldId: string, data: T.CreateRoomInput, options?: RequestOptions<T.CreateRoomInput>): Promise<import("axios").AxiosResponse<T.RoomResponse, T.CreateRoomInput, {}>>;
22
+ createRoom(worldId: string, data: T.CreateRoomInput, options?: RequestOptions<T.CreateRoomInput>): Promise<import("axios").AxiosResponse<T.RoomResponse, T.CreateRoomInput, {}, any>>;
23
23
  /** Joins a room via `POST /api/v1/rooms/{roomId}/join`. @param roomId Room UUID. @param userId IDP user UUID. @returns A short-lived typed realtime ticket. @throws AxiosError for capacity, validation, authorization, not-found, or transport failures. */
24
- join(roomId: string, userId: string, options?: RequestOptions<{
25
- user_id: string;
26
- }>): Promise<import("axios").AxiosResponse<T.JoinResponse, {
27
- user_id: string;
28
- }, {}>>;
24
+ join(roomId: string, userId: string, options?: RequestOptions<T.JoinRoomInput>): Promise<import("axios").AxiosResponse<T.JoinResponse, T.JoinRoomInput, {}, any>>;
29
25
  /** Lists WASM modules via `GET /api/v1/worlds/{worldId}/wasm`. @param worldId World UUID. @returns Full Axios response with typed module metadata. @throws AxiosError for authorization, not-found, or transport failures. */
30
- wasmModules(worldId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<{
31
- data: T.WasmModuleInfo[];
32
- }, any, {}>>;
26
+ wasmModules(worldId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.WasmModuleListResponse, any, {}, any>>;
33
27
  /** Uploads base64 WASM via `POST /api/v1/worlds/{worldId}/wasm`. @param worldId World UUID. @param data Module name, bytes, and exports. @returns Full typed Axios response. @throws AxiosError for invalid WASM, authorization, not-found, or transport failures. */
34
- uploadWasm(worldId: string, data: T.UploadWasmInput, options?: RequestOptions<T.UploadWasmInput>): Promise<import("axios").AxiosResponse<{
35
- data: T.WasmModuleInfo;
36
- }, T.UploadWasmInput, {}>>;
28
+ uploadWasm(worldId: string, data: T.UploadWasmInput, options?: RequestOptions<T.UploadWasmInput>): Promise<import("axios").AxiosResponse<T.WasmModuleResponse, T.UploadWasmInput, {}, any>>;
37
29
  /** Lists callable endpoints via `GET /api/v1/worlds/{worldId}/endpoints`. @param worldId World UUID. @returns Full typed Axios response. @throws AxiosError for authorization, not-found, or transport failures. */
38
- endpoints(worldId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<{
39
- data: T.WasmEndpoint[];
40
- }, any, {}>>;
30
+ endpoints(worldId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.WasmEndpointListResponse, any, {}, any>>;
41
31
  /** Registers an endpoint via `POST /api/v1/worlds/{worldId}/endpoints`. @param worldId World UUID. @param data WASM export binding. @returns Full typed Axios response. @throws AxiosError for validation, authorization, not-found, or transport failures. */
42
- createEndpoint(worldId: string, data: T.CreateWasmEndpointInput, options?: RequestOptions<T.CreateWasmEndpointInput>): Promise<import("axios").AxiosResponse<{
43
- data: T.WasmEndpoint;
44
- }, T.CreateWasmEndpointInput, {}>>;
32
+ createEndpoint(worldId: string, data: T.CreateWasmEndpointInput, options?: RequestOptions<T.CreateWasmEndpointInput>): Promise<import("axios").AxiosResponse<T.WasmEndpointResponse, T.CreateWasmEndpointInput, {}, any>>;
45
33
  /** Invokes a registered endpoint via `POST /api/v1/rooms/{roomId}/endpoints/{slug}`. @param roomId Room UUID. @param slug Endpoint slug. @param data Player/entity inputs. @returns Authoritative state patch in a full Axios response. @throws AxiosError for validation, authorization, not-found, execution, or transport failures. */
46
- invoke(roomId: string, slug: string, data: T.InvokeWasmInput, options?: RequestOptions<T.InvokeWasmInput>): Promise<import("axios").AxiosResponse<T.StatePatchResponse, T.InvokeWasmInput, {}>>;
34
+ invoke(roomId: string, slug: string, data: T.InvokeWasmInput, options?: RequestOptions<T.InvokeWasmInput>): Promise<import("axios").AxiosResponse<T.StatePatchResponse, T.InvokeWasmInput, {}, any>>;
47
35
  /** Enqueues the authenticated user; identity is never accepted in the body. */
48
- enqueueMatchmaking(gameId: string, data: import("./match.js").EnqueueMatchmakingInput, options?: RequestOptions<import("./match.js").EnqueueMatchmakingInput>): Promise<import("axios").AxiosResponse<{
49
- data: import("./match.js").MatchmakingTicket;
50
- }, import("./match.js").EnqueueMatchmakingInput, {}>>;
51
- matchmakingTicket(gameId: string, ticketId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<{
52
- data: import("./match.js").MatchmakingTicket;
53
- }, any, {}>>;
54
- cancelMatchmaking(gameId: string, ticketId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<{
55
- data: import("./match.js").MatchmakingTicket;
56
- }, any, {}>>;
57
- matchView<View = import("./match.js").MatchView>(matchId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<{
58
- data: View;
59
- }, any, {}>>;
60
- createMatchConnection(matchId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<{
61
- data: import("./match.js").MatchConnectionTicket;
62
- }, Record<string, never>, {}>>;
36
+ enqueueMatchmaking(gameId: string, data: import("./match.js").EnqueueMatchmakingInput, options?: RequestOptions<import("./match.js").EnqueueMatchmakingInput>): Promise<import("axios").AxiosResponse<import("./contracts.types.js").MatchmakingResponse, import("./match.js").EnqueueMatchmakingInput, {}, any>>;
37
+ /** Read an owner-scoped matchmaking ticket; requires state:execute. Returns a full Axios response; failures throw AxiosError. */
38
+ matchmakingTicket(gameId: string, ticketId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./contracts.types.js").MatchmakingResponse, any, {}, any>>;
39
+ /** Cancel a queued owner-scoped ticket; matched tickets conflict (409). Requires state:execute; returns full Axios response. */
40
+ cancelMatchmaking(gameId: string, ticketId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./contracts.types.js").MatchmakingResponse, any, {}, any>>;
41
+ /** Read the caller-specific match projection; requires state:execute and membership. Missing/foreign matches return 404. */
42
+ matchView<View = import("./match.js").MatchView>(matchId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./contracts.types.js").MatchViewResponse<View>, any, {}, any>>;
43
+ /** Issue a 30-second one-use hello ticket; requires state:execute and membership. Returns full Axios response. */
44
+ createMatchConnection(matchId: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./contracts.types.js").MatchConnectionResponse, Record<string, never>, {}, any>>;
63
45
  }
64
46
  //# sourceMappingURL=api.d.ts.map
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,KAAK,CAAC,MAAM,YAAY,CAAC;AAErC,iIAAiI;AACjI,qBAAa,QAAS,SAAQ,UAAU;IACtC,QAAQ,CAAC,UAAU,kBAAoC;IACvD,iMAAiM;IACjM,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc;IAC/B,kLAAkL;IAClL,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc;IAC/B,mLAAmL;IACnL,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;IAC1C,iOAAiO;IACjO,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAClF,yPAAyP;IACzP,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAA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CAAC,uBAAuB,CAAC;IACpH,0UAA0U;IAC1U,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC;IACzG,+EAA+E;IAC/E,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,YAAY,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,EAAE,uBAAuB,CAAC;IAC7J,iIAAiI;IACjI,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;IAC5E,gIAAgI;IAChI,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;IAC5E,4HAA4H;IAC5H,SAAS,CAAC,IAAI,GAAG,OAAO,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;IAC1F,kHAAkH;IAClH,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;CAChE"}
package/dist/api.js CHANGED
@@ -3,7 +3,7 @@ import { ServiceApi } from "@faiber/sdk-core";
3
3
  /** REST control plane for authoritative realtime worlds. Every route requires the shared IDP-authorized organization context. */
4
4
  export class StateApi extends ServiceApi {
5
5
  operations = new StateOperations(this.client);
6
- /** Checks State runtime readiness via `GET /health`. @returns Full Axios response with transport and WASM capability state. @throws AxiosError for unavailable or failed transport responses. */
6
+ /** Reads the static State process advertisement via `GET /health`. @returns Full Axios response with advertised transports, rulesets and WASM support; no downstream readiness guarantee. @throws AxiosError for unavailable or failed transport responses. */
7
7
  health(options) { return this.client.get("/health", undefined, options); }
8
8
  /** Lists visible worlds via `GET /api/v1/worlds`. @returns Full Axios response with typed worlds. @throws AxiosError for authentication, authorization, or transport failures. */
9
9
  worlds(options) { return this.client.get("/api/v1/worlds", undefined, options); }
@@ -33,9 +33,13 @@ export class StateApi extends ServiceApi {
33
33
  invoke(roomId, slug, data, options) { return this.client.post(`/api/v1/rooms/${encodeURIComponent(roomId)}/endpoints/${encodeURIComponent(slug)}`, data, options); }
34
34
  /** Enqueues the authenticated user; identity is never accepted in the body. */
35
35
  enqueueMatchmaking(gameId, data, options) { return this.client.post(`/api/v2/games/${encodeURIComponent(gameId)}/matchmaking/tickets`, data, options); }
36
+ /** Read an owner-scoped matchmaking ticket; requires state:execute. Returns a full Axios response; failures throw AxiosError. */
36
37
  matchmakingTicket(gameId, ticketId, options) { return this.client.get(`/api/v2/games/${encodeURIComponent(gameId)}/matchmaking/tickets/${encodeURIComponent(ticketId)}`, undefined, options); }
38
+ /** Cancel a queued owner-scoped ticket; matched tickets conflict (409). Requires state:execute; returns full Axios response. */
37
39
  cancelMatchmaking(gameId, ticketId, options) { return this.client.delete(`/api/v2/games/${encodeURIComponent(gameId)}/matchmaking/tickets/${encodeURIComponent(ticketId)}`, options); }
40
+ /** Read the caller-specific match projection; requires state:execute and membership. Missing/foreign matches return 404. */
38
41
  matchView(matchId, options) { return this.client.get(`/api/v2/matches/${encodeURIComponent(matchId)}/view`, undefined, options); }
42
+ /** Issue a 30-second one-use hello ticket; requires state:execute and membership. Returns full Axios response. */
39
43
  createMatchConnection(matchId, options) { return this.client.post(`/api/v2/matches/${encodeURIComponent(matchId)}/connections`, {}, options); }
40
44
  }
41
45
  //# sourceMappingURL=api.js.map
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AAGnE,iIAAiI;AACjI,MAAM,OAAO,QAAS,SAAQ,UAAU;I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,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5Q,4HAA4H;IAC5H,SAAS,CAAwC,OAAe,EAAE,OAAwB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAyD,mBAAmB,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1P,kHAAkH;IAClH,qBAAqB,CAAC,OAAe,EAAE,OAAwB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAgF,mBAAmB,kBAAkB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;CACxP"}
@@ -1,6 +1,6 @@
1
1
  /** Wire models reviewed against the pinned service handlers and repositories. */
2
2
  import type { JsonValue } from '@faiber/sdk-core';
3
- /** State v2 returns {data}, without the status/message fields used by v1. */
3
+ /** State v1 and v2 return {data}; neither adds status/message fields. */
4
4
  export interface GameResult<T> {
5
5
  data: T;
6
6
  }
@@ -222,4 +222,119 @@ export interface GameLobbyJoined {
222
222
  export type StateRoomRealtimeOptions = import("./realtime.js").RealtimeOptions & {
223
223
  signal?: AbortSignal;
224
224
  };
225
+ /** Static process advertisement; not a persistence or provider readiness check. */
226
+ export interface StateProcessHealthResponse {
227
+ data: {
228
+ service: "infera-state";
229
+ status: "healthy";
230
+ transports: ["websocket"];
231
+ rulesets: ["kheradgah.v1"];
232
+ wasm: true;
233
+ };
234
+ }
235
+ export interface GameEconomyInput {
236
+ entryCoins: number;
237
+ burnPercent: number;
238
+ enabled: boolean;
239
+ }
240
+ export interface GameEconomy extends GameEconomyInput {
241
+ gameId: string;
242
+ rulesetRevision: number;
243
+ }
244
+ export interface GameOperationsBreakdown {
245
+ gameId: string;
246
+ status: string;
247
+ paid: boolean;
248
+ settlementStatus: string;
249
+ count: number;
250
+ }
251
+ export interface GameOperationsSummary {
252
+ sessions: number;
253
+ active: number;
254
+ finished: number;
255
+ paid: number;
256
+ pendingSettlements: number;
257
+ breakdown: GameOperationsBreakdown[];
258
+ }
259
+ export interface GameOperationMember {
260
+ userId: string;
261
+ score: number;
262
+ ready: boolean;
263
+ forfeited: boolean;
264
+ joinedAt: string;
265
+ }
266
+ export interface GameOperationSession {
267
+ id: string;
268
+ gameId: string;
269
+ ownerId: string;
270
+ difficulty: string;
271
+ status: string;
272
+ paid: boolean;
273
+ entryCoins: number;
274
+ burnPercent: number;
275
+ round: number;
276
+ totalRounds: number;
277
+ score: number;
278
+ attempts: number;
279
+ hints: number;
280
+ version: number;
281
+ sequence: number;
282
+ metrics: GamePayload;
283
+ settlementStatus: string;
284
+ eventCount: number;
285
+ members: GameOperationMember[];
286
+ createdAt: string;
287
+ finishedAt: string | null;
288
+ }
289
+ /** payload is stored, game-authored event JSON; the enclosing event record is stable. */
290
+ export interface GameOperationEvent {
291
+ id: string;
292
+ userId: string;
293
+ sequence: number;
294
+ kind: string;
295
+ payload: GamePayload;
296
+ createdAt: string;
297
+ }
298
+ export interface GameOperationPage<T> {
299
+ items: T[];
300
+ page: number;
301
+ pageSize: number;
302
+ total: number;
303
+ pages: number;
304
+ }
305
+ export type GameOperationSessionsResponse = GameResult<GameOperationPage<GameOperationSession>>;
306
+ export type GameOperationEventsResponse = GameResult<GameOperationPage<GameOperationEvent>>;
307
+ export type GameOperationsSummaryResponse = GameResult<GameOperationsSummary>;
308
+ export type GameEconomiesResponse = GameResult<GameEconomy[]>;
309
+ export type GameEconomyResponse = GameResult<GameEconomy>;
310
+ export type MatchmakingResponse = GameResult<import("./match.js").MatchmakingTicket>;
311
+ export type MatchViewResponse<View = import("./match.js").MatchView> = GameResult<View>;
312
+ export type MatchConnectionResponse = GameResult<KheradgahConnectionTicket>;
313
+ /** Concrete revision-two multiplayer Player DTO. carrying is null when no civilian is held. */
314
+ export interface GameBoardPlayer {
315
+ id: string;
316
+ score: number;
317
+ position: number;
318
+ carrying: number | null;
319
+ delivered: number[];
320
+ claims: number[];
321
+ multiplicationsLeft: number;
322
+ fuel: number;
323
+ cargo: number;
324
+ water: number;
325
+ energy: number;
326
+ materials: number;
327
+ houses: number;
328
+ transportLeft: number;
329
+ developments: string[];
330
+ }
331
+ /** Public multiplayer Board projection excludes the private seed; scene is game-specific JSON and hides private puzzle solutions. */
332
+ export interface GameMultiplayerBoard {
333
+ game: string;
334
+ turn: number;
335
+ maxTurns: number;
336
+ scene: GamePayload;
337
+ players: GameBoardPlayer[];
338
+ submittedIds: string[];
339
+ }
225
340
  //# sourceMappingURL=contracts.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.types.d.ts","sourceRoot":"","sources":["../src/contracts.types.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,6EAA6E;AAC7E,MAAM,WAAW,UAAU,CAAC,CAAC;IAAI,IAAI,EAAE,CAAC,CAAA;CAAE;AAC1C,yGAAyG;AACzG,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC;AACpC,MAAM,WAAW,gBAAgB;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;AAChT,MAAM,WAAW,eAAe;IAAG,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU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AAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE;AAC3T,qIAAqI;AACrI,MAAM,WAAW,oBAAoB;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE"}
package/dist/match.d.ts CHANGED
@@ -17,7 +17,7 @@ export interface MatchConnectionTicket {
17
17
  websocketUrl: string;
18
18
  expiresAt: string;
19
19
  }
20
- export interface MatchPlayerView<Hero = unknown> {
20
+ export interface MatchPlayerView<Hero = import("./contracts.types.js").KheradgahHero> {
21
21
  userId: string;
22
22
  resolve: number;
23
23
  insight: number;
@@ -31,10 +31,11 @@ export interface MatchPlayerView<Hero = unknown> {
31
31
  export interface MatchQuestion {
32
32
  id: string;
33
33
  prompt: string;
34
- kind: string;
34
+ revision: number;
35
+ kind: "numeric" | "short_text" | "boolean";
35
36
  school: string;
36
37
  }
37
- export interface MatchView<Hero = unknown> {
38
+ export interface MatchView<Hero = import("./contracts.types.js").KheradgahHero> {
38
39
  gameId: string;
39
40
  matchId: string;
40
41
  mode: MatchMode;
@@ -47,9 +48,11 @@ export interface MatchView<Hero = unknown> {
47
48
  players: MatchPlayerView<Hero>[];
48
49
  question: MatchQuestion | null;
49
50
  winnerIds: string[];
51
+ createdAt: string;
50
52
  you: string;
51
53
  }
52
- export interface GameCommand<Payload = unknown> {
54
+ /** Registered command payload JSON; use KheradgahCommand for the discriminated built-in answer/order contract. */
55
+ export interface GameCommand<Payload = import("./contracts.types.js").GamePayload> {
53
56
  clientCommandId: string;
54
57
  expectedStateVersion: number;
55
58
  kind: "submit_answer" | "submit_order" | "pass" | "concede";
@@ -66,9 +69,11 @@ export type MatchRealtimeEvent<View = MatchView> = {
66
69
  view: View;
67
70
  } | {
68
71
  type: "command_result";
69
- result?: CommandResult;
70
- accepted?: false;
71
- code?: string;
72
+ result: CommandResult;
73
+ } | {
74
+ type: "command_result";
75
+ accepted: false;
76
+ code: string;
72
77
  } | {
73
78
  type: "error";
74
79
  code: string;
@@ -76,6 +81,7 @@ export type MatchRealtimeEvent<View = MatchView> = {
76
81
  };
77
82
  export interface MatchRealtimeOptions<View = MatchView> {
78
83
  WebSocket?: typeof WebSocket;
84
+ /** Required for automatic reconnect: each match ticket is consumed by its hello. */
79
85
  refreshTicket?: () => Promise<MatchConnectionTicket>;
80
86
  reconnect?: boolean;
81
87
  maxReconnectDelayMs?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../src/match.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,iBAAiB,GAAG,YAAY,CAAC;AAEzE,MAAM,WAAW,uBAAuB;IAAG,IAAI,EAAE,SAAS,CAAA;CAAE;AAC5D,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAC5D,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,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AO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,IAAI;IAE3D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAcxB,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC;IAM3C,KAAK;IAEL,OAAO,CAAC,OAAO;YAQD,SAAS;CAWxB"}
package/dist/match.js CHANGED
@@ -16,13 +16,15 @@ export class MatchRealtimeClient {
16
16
  const Socket = this.options.WebSocket ?? globalThis.WebSocket;
17
17
  if (!Socket)
18
18
  return Promise.reject(new Error("WebSocket is unavailable"));
19
+ if (this.closed)
20
+ return Promise.reject(new Error("Match client is closed"));
19
21
  return new Promise((resolve, reject) => {
20
22
  const socket = new Socket(this.ticket.websocketUrl);
21
23
  this.socket = socket;
22
24
  socket.onopen = () => { this.attempt = 0; socket.send(JSON.stringify({ type: "hello", ticket: this.ticket.ticket })); resolve(); };
23
25
  socket.onmessage = message => this.receive(String(message.data));
24
26
  socket.onerror = () => reject(new Error("Unable to connect to Faiber State"));
25
- socket.onclose = () => { if (!this.closed && this.options.reconnect !== false)
27
+ socket.onclose = () => { reject(new Error("Match connection closed before opening")); if (!this.closed && this.options.reconnect !== false && this.options.refreshTicket)
26
28
  void this.reconnect(); };
27
29
  });
28
30
  }
@@ -45,10 +47,17 @@ export class MatchRealtimeClient {
45
47
  async reconnect() {
46
48
  const base = Math.min(this.options.maxReconnectDelayMs ?? 8_000, 500 * 2 ** this.attempt++);
47
49
  await new Promise(resolve => setTimeout(resolve, base / 2 + Math.random() * base / 2));
48
- if (this.options.refreshTicket)
50
+ if (this.closed || !this.options.refreshTicket)
51
+ return;
52
+ try {
49
53
  this.ticket = await this.options.refreshTicket();
50
- if (!this.closed)
51
- await this.connect().catch(() => this.reconnect());
54
+ if (!this.closed)
55
+ await this.connect().catch(() => { });
56
+ }
57
+ catch {
58
+ if (!this.closed)
59
+ void this.reconnect();
60
+ }
52
61
  }
53
62
  }
54
63
  //# sourceMappingURL=match.js.map