@my-swu/simulator-client 0.1.3 → 0.1.5

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.
Files changed (41) hide show
  1. package/dist/generated/index.d.ts +3 -0
  2. package/dist/generated/schemas.d.ts +1 -1
  3. package/dist/generated/schemas.js +626 -0
  4. package/dist/generated/types/admin-match-debug-bundle.d.ts +1 -1
  5. package/dist/generated/types/admin-match-replay-response.d.ts +1 -1
  6. package/dist/generated/types/client-message.d.ts +1 -1
  7. package/dist/generated/types/common.d.ts +193 -0
  8. package/dist/generated/types/create-playground-share-response.d.ts +1 -0
  9. package/dist/generated/types/create-playground-share-response.js +2 -0
  10. package/dist/generated/types/game-command.d.ts +1 -1
  11. package/dist/generated/types/match-history-replay-response.d.ts +1 -1
  12. package/dist/generated/types/playground-export-payload.d.ts +1 -0
  13. package/dist/generated/types/playground-export-payload.js +2 -0
  14. package/dist/generated/types/server-message.d.ts +1 -1
  15. package/dist/generated/types/set-ai-paused-response.d.ts +1 -1
  16. package/dist/generated/types/set-playground-ai-seat-request.d.ts +1 -0
  17. package/dist/generated/types/set-playground-ai-seat-request.js +2 -0
  18. package/dist/generated/types/shared-match-history-replay-response.d.ts +1 -1
  19. package/dist/generated/types/welcome-payload.d.ts +1 -1
  20. package/dist/generated/version.d.ts +1 -1
  21. package/dist/generated/version.js +1 -1
  22. package/dist/index.d.ts +1 -0
  23. package/dist/match-session/controller.d.ts +1 -0
  24. package/dist/match-session/controller.js +3 -0
  25. package/dist/match-session/types.d.ts +2 -0
  26. package/dist/resources/admin.d.ts +3 -1
  27. package/dist/resources/admin.js +1 -0
  28. package/dist/resources/match-types.d.ts +11 -1
  29. package/dist/resources/matches.js +49 -0
  30. package/dist/validators.d.ts +4 -1
  31. package/package.json +1 -1
  32. package/schema/common.schema.json +491 -0
  33. package/schema/create-match-request.schema.json +5 -0
  34. package/schema/create-playground-share-response.schema.json +22 -0
  35. package/schema/game-command.schema.json +20 -0
  36. package/schema/game-state.schema.json +15 -0
  37. package/schema/manifest.json +4 -1
  38. package/schema/match-save-payload.schema.json +8 -0
  39. package/schema/playground-export-payload.schema.json +26 -0
  40. package/schema/route-manifest.json +58 -0
  41. package/schema/set-playground-ai-seat-request.schema.json +36 -0
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "PlaygroundExportPayload",
4
+ "description": "Portable Playground file. `restore_token` is a dedicated capability and\nnever contains a live match seat token.",
5
+ "type": "object",
6
+ "properties": {
7
+ "restoreToken": {
8
+ "type": "string"
9
+ },
10
+ "save": {
11
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/MatchSavePayload"
12
+ },
13
+ "version": {
14
+ "type": "integer",
15
+ "format": "uint8",
16
+ "maximum": 1,
17
+ "minimum": 1
18
+ }
19
+ },
20
+ "additionalProperties": false,
21
+ "required": [
22
+ "version",
23
+ "save",
24
+ "restoreToken"
25
+ ]
26
+ }
@@ -32,6 +32,17 @@
32
32
  "method": "getGameReplay"
33
33
  }
34
34
  },
35
+ {
36
+ "operationId": "createAdminGameReplayShare",
37
+ "method": "POST",
38
+ "path": "/api/admin/games/{history_id}/replay-shares",
39
+ "responseSchema": "create-match-history-replay-share-response",
40
+ "sdk": {
41
+ "kind": "required",
42
+ "resource": "admin",
43
+ "method": "createGameReplayShare"
44
+ }
45
+ },
35
46
  {
36
47
  "operationId": "listSimulatorReports",
37
48
  "method": "GET",
@@ -401,6 +412,41 @@
401
412
  "method": "save"
402
413
  }
403
414
  },
415
+ {
416
+ "operationId": "match_playground_export",
417
+ "method": "POST",
418
+ "path": "/api/matches/{match_id}/playground/export",
419
+ "requestSchema": "save-match-request",
420
+ "responseSchema": "playground-export-payload",
421
+ "sdk": {
422
+ "kind": "required",
423
+ "resource": "matches",
424
+ "method": "exportPlayground"
425
+ }
426
+ },
427
+ {
428
+ "operationId": "match_playground_share_create",
429
+ "method": "POST",
430
+ "path": "/api/matches/{match_id}/playground-shares",
431
+ "requestSchema": "save-match-request",
432
+ "responseSchema": "create-playground-share-response",
433
+ "sdk": {
434
+ "kind": "required",
435
+ "resource": "matches",
436
+ "method": "createPlaygroundShare"
437
+ }
438
+ },
439
+ {
440
+ "operationId": "match_playground_share_restore",
441
+ "method": "POST",
442
+ "path": "/api/playground-shares/{share_token}/restore",
443
+ "responseSchema": "restore-match-save-response",
444
+ "sdk": {
445
+ "kind": "required",
446
+ "resource": "matches",
447
+ "method": "restorePlaygroundShare"
448
+ }
449
+ },
404
450
  {
405
451
  "operationId": "match_undo",
406
452
  "method": "POST",
@@ -449,6 +495,18 @@
449
495
  "method": "setAiPaused"
450
496
  }
451
497
  },
498
+ {
499
+ "operationId": "match_playground_ai_seat",
500
+ "method": "POST",
501
+ "path": "/api/matches/{match_id}/playground/ai",
502
+ "requestSchema": "set-playground-ai-seat-request",
503
+ "responseSchema": "set-ai-paused-response",
504
+ "sdk": {
505
+ "kind": "required",
506
+ "resource": "matches",
507
+ "method": "setPlaygroundAiSeat"
508
+ }
509
+ },
452
510
  {
453
511
  "operationId": "match_join",
454
512
  "method": "POST",
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "SetPlaygroundAiSeatRequest",
4
+ "description": "Host-authored AI controller settings for one Playground seat.",
5
+ "type": "object",
6
+ "properties": {
7
+ "difficulty": {
8
+ "description": "`None` removes the AI controller from this seat.",
9
+ "anyOf": [
10
+ {
11
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/AiDifficulty"
12
+ },
13
+ {
14
+ "type": "null"
15
+ }
16
+ ]
17
+ },
18
+ "paused": {
19
+ "description": "Manual per-seat pause state. Ignored when `difficulty` is `None`.",
20
+ "type": "boolean"
21
+ },
22
+ "seat": {
23
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/Seat"
24
+ },
25
+ "seatToken": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "additionalProperties": false,
30
+ "required": [
31
+ "seatToken",
32
+ "seat",
33
+ "difficulty",
34
+ "paused"
35
+ ]
36
+ }