@indiegems/gem-web-sdk 11.1.1 → 12.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/CHANGELOG.md +20 -0
- package/README.md +3 -1
- package/dist/game.d.ts +49 -0
- package/dist/gem-web-sdk.bridge.js +1 -1
- package/dist/gem-web-sdk.esm.js +2 -2
- package/dist/gem-web-sdk.function.js +2 -2
- package/dist/gem-web-sdk.game.js +2 -2
- package/dist/gem-web-sdk.min.js +2 -2
- package/dist/gem-web-sdk.sdk.js +2 -2
- package/dist/gem-web-sdk.server.js +2 -2
- package/dist/index.d.ts +66 -4
- package/dist/sdk.d.ts +49 -0
- package/docs/api/api-reference-function.md +7916 -0
- package/docs/api/api-reference-game.md +196 -3
- package/docs/api/api-reference-server.md +5 -3
- package/docs/api/reference.json +9492 -4
- package/docs/changelog.md +20 -0
- package/docs/friends.md +14 -0
- package/docs/getting-started.md +5 -2
- package/docs/manifest.json +16 -16
- package/docs/rooms-and-matches.md +64 -1
- package/docs/server-bundles.md +2 -2
- package/docs/serverless-functions-js.md +118 -44
- package/docs/serverless-functions.md +26 -11
- package/docs/what-a-game-must-do.md +3 -0
- package/package.json +1 -1
- package/schema/bridge.v1.json +84 -0
- package/schema/capabilities.public.json +6 -0
package/schema/bridge.v1.json
CHANGED
|
@@ -1514,6 +1514,90 @@
|
|
|
1514
1514
|
},
|
|
1515
1515
|
"rateLimit": { "perMinute": 30 }
|
|
1516
1516
|
},
|
|
1517
|
+
{
|
|
1518
|
+
"type": "gem.ticketEvent",
|
|
1519
|
+
"direction": "parentToFrame",
|
|
1520
|
+
"transport": "port",
|
|
1521
|
+
"$comment": [
|
|
1522
|
+
"A matchmaking ticket this player is on changed state. Gated by the",
|
|
1523
|
+
"`ticketEvents` capability; the mapping lives in schema/capabilities.json",
|
|
1524
|
+
"and nowhere else.",
|
|
1525
|
+
"",
|
|
1526
|
+
"gem-api's `matchmaking_ticket_queued`, `_matched`, `_expired`,",
|
|
1527
|
+
"`_cancelled` and `_failed`, which it sends to EVERY player a ticket",
|
|
1528
|
+
"seats: its owner and, for a party's ticket, every member. A party",
|
|
1529
|
+
"queues as one ticket and it is the leader's, so a member's frame is on a",
|
|
1530
|
+
"ticket it never created and cannot read — only the owner may. This is",
|
|
1531
|
+
"the only thing that can tell that frame its party is queued, and how",
|
|
1532
|
+
"the wait ended.",
|
|
1533
|
+
"",
|
|
1534
|
+
"A HINT, LIKE EVERY RELAY, and for a member a hint with nothing behind",
|
|
1535
|
+
"it to re-read. So the frame gives it exactly the authority of a",
|
|
1536
|
+
"display: a member's view of the ticket can be shown and cannot be",
|
|
1537
|
+
"cancelled or kept alive, and nothing is entered on the strength of it.",
|
|
1538
|
+
"A `matched` makes the frame look for the seat over its OWN token, which",
|
|
1539
|
+
"is where a room is believed. For the ticket's OWNER the event is a cue",
|
|
1540
|
+
"to ask the platform at once, exactly as a relayed match start is.",
|
|
1541
|
+
"",
|
|
1542
|
+
"ITS OWN TYPE, for the reason gem.seatedEvent gives: an unknown TYPE is",
|
|
1543
|
+
"ignored by any frame, and the capability keeps the parent from sending",
|
|
1544
|
+
"it to a frame that would not understand it.",
|
|
1545
|
+
"",
|
|
1546
|
+
"NOTHING ABOUT ANYBODY CROSSES. The push names no player and no other",
|
|
1547
|
+
"ticket, and neither does this. The templates gem-api lists on `queued`",
|
|
1548
|
+
"stop at the parent: the frame's game chose them, or its leader's did.",
|
|
1549
|
+
"",
|
|
1550
|
+
"`event` IS CLOSED, and it is the ticket's status. A status gem-api adds",
|
|
1551
|
+
"later is not relayed until this enum names it — the parent drops what",
|
|
1552
|
+
"it cannot name rather than send a value the frame would refuse.",
|
|
1553
|
+
"",
|
|
1554
|
+
"PARENT TO FRAME ONLY. A frame-authored ticket event would let a game",
|
|
1555
|
+
"tell the parent, and through it nobody, that a queue it does not own",
|
|
1556
|
+
"moved."
|
|
1557
|
+
],
|
|
1558
|
+
"fields": {
|
|
1559
|
+
"event": {
|
|
1560
|
+
"kind": "enum",
|
|
1561
|
+
"values": ["queued", "matched", "expired", "cancelled", "failed"],
|
|
1562
|
+
"$comment": "The ticket's status after the change. `queued` is its creation; every other value is final."
|
|
1563
|
+
},
|
|
1564
|
+
"ticketId": { "kind": "string", "maxLength": 64 },
|
|
1565
|
+
"partySize": {
|
|
1566
|
+
"kind": "int",
|
|
1567
|
+
"min": 1,
|
|
1568
|
+
"max": 64,
|
|
1569
|
+
"optional": true,
|
|
1570
|
+
"$comment": "How many players the ticket seats. Sent with `queued`."
|
|
1571
|
+
},
|
|
1572
|
+
"queuedAt": {
|
|
1573
|
+
"kind": "int",
|
|
1574
|
+
"min": 0,
|
|
1575
|
+
"max": 4102444800,
|
|
1576
|
+
"optional": true,
|
|
1577
|
+
"$comment": "When the ticket was queued, in Unix seconds. Sent with `queued`."
|
|
1578
|
+
},
|
|
1579
|
+
"expiresAt": {
|
|
1580
|
+
"kind": "int",
|
|
1581
|
+
"min": 0,
|
|
1582
|
+
"max": 4102444800,
|
|
1583
|
+
"optional": true,
|
|
1584
|
+
"$comment": "When the ticket gives up if it is still waiting, in Unix seconds. Sent with `queued`. A frame that has seen no ending once this long has passed stops showing the ticket as waiting: the pushes are not retried, and a member has no other way to learn the ticket is over."
|
|
1585
|
+
},
|
|
1586
|
+
"reason": {
|
|
1587
|
+
"kind": "string",
|
|
1588
|
+
"maxLength": 64,
|
|
1589
|
+
"optional": true,
|
|
1590
|
+
"$comment": "Why a ticket ended without a match: `timed_out`, `heartbeat_lapsed`, `requested`, `party_changed`, `handoff_failed`. Open, so a reason added later reaches the game."
|
|
1591
|
+
},
|
|
1592
|
+
"roomId": {
|
|
1593
|
+
"kind": "string",
|
|
1594
|
+
"maxLength": 64,
|
|
1595
|
+
"optional": true,
|
|
1596
|
+
"$comment": "The room a `matched` ticket's players were seated in. A place to look, not a seat: the frame reads the room over its own token and checks this player is a member."
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
"rateLimit": { "perMinute": 60 }
|
|
1600
|
+
},
|
|
1517
1601
|
|
|
1518
1602
|
{
|
|
1519
1603
|
"type": "gem.signalEvent",
|