Skip to content

Commit 9d0ce01

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 5133233 + 50d6166 commit 9d0ce01

16 files changed

Lines changed: 1750 additions & 72 deletions

‎assets/playlist-write-v2.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=5ef79df8b0c254905e5ea4aa43d8921e1c3470ced2cd440c418376d8e9d2ce0e. Shape validation for the adslot page union. Run canonical playlist-write-semantics.ts next. At most 16 adslot pages and one ordinary page with no visibility remain server checks.",
2+
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=30fc492b905cf3c69f8b5972c19af58b38f04e3d5059e36fc123d62816601c93. Shape validation for the adslot page union. Run canonical playlist-write-semantics.ts next. At most 16 adslot pages and one ordinary page with no visibility remain server checks.",
33
"$defs": {
44
"AdslotPageWrite": {
55
"additionalProperties": false,

‎assets/playlist-write.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=5ef79df8b0c254905e5ea4aa43d8921e1c3470ced2cd440c418376d8e9d2ce0e. Shape validation only; run canonical playlist-write-semantics.ts next. Reference resolution and DNS remain server checks.",
2+
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=30fc492b905cf3c69f8b5972c19af58b38f04e3d5059e36fc123d62816601c93. Shape validation only; run canonical playlist-write-semantics.ts next. Reference resolution and DNS remain server checks.",
33
"$defs": {
44
"CanvasBackground": {
55
"description": "Solid canonical uppercase #RRGGBBAA, or a top-to-bottom linear gradient.",

‎contracts.sha256‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
a3f1d0147ca522533c5314467e1dda6f6bf6ad723bedce253451a2fbec90e4c9 assets/playlist-write-v2.schema.json
2-
45e683d0a9118c9235dc6ac7d2e6421110ac6ce86eccfa208223b113353d97fa assets/playlist-write.schema.json
1+
eac70bfe83a4524425d96d92826a803b30d9adc72c5974cb62c513c20337cc4a assets/playlist-write-v2.schema.json
2+
57c92a960074c9fc2c0508e9851fa58cef657d39a258fca44fc67e42df316210 assets/playlist-write.schema.json
33
196c14344083df520e4dc3a87e3ac13dfa451980281d6b125bee00d70f445b68 assets/screenrig.runtime.js
4-
0e67f6100416d3b6785b44b5004d22ab2d9e8dd3c5a68f13caa5275d3041374d contracts.source
4+
9b3f11eb78fb31cb318e1bd841e4545e30018ebd352f2ab364a1c14abfb4cee9 contracts.source
55
793525dd0551533ec1730fbd3a8561189f819895a11b95b7c703383d2abc3eb1 src/generated/playlist-write-semantics.ts
66
30d91e0b855e59700dee5de38922a2c807b8bff15ccc3317612b7de8ad8ec4e5 src/generated/resource-ids.ts
7-
bdada479b83fe09121e7a3a3bb98f6bddb08077b3ef16c91b7447ec55f98d23b vendor/openapi.yaml
8-
5a7917f5bd6a154e9adefb2d4bad3b4d8038f2ba5c7dcd1358ed839997754d36 vendor/protocol/openapi.gen.ts
7+
28e4f0dcf6864b2dbfbfbb328b16bcae253eb790ccccb1b6d90e1caf6048d001 vendor/openapi.yaml
8+
eb4d245df04e48881bc57ada645e29b108ecffaf7815265e1a979be0bedc88a5 vendor/protocol/openapi.gen.ts

‎contracts.source‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
backend 0b02cbc0c04119b4f22aa6f20c9b894bfd99fe1d
1+
backend 4319691a180611e4eeb3152dcf5547a957bbed5b

‎src/adapters/protocol.ts‎

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,61 @@ export interface ScreenDisplayScheduleView {
583583
display?: ScreenDisplay;
584584
}
585585

586+
/** sent: the screen was online and its Player was handed the command at once. queued: the screen was offline; the command is sent when it comes online before expires_at. */
587+
export type ScreenCommandDelivery = "queued" | "sent";
588+
586589
export interface ScreenRebootAccepted {
587590
reboot_id: string;
588591
expires_at: string;
592+
state: ScreenCommandDelivery;
593+
}
594+
595+
/** The optional body of POST /api/screens/{id}/reboot and /reload: how long the command stays actionable, 60 to 86400 seconds (default 86400). */
596+
export interface ScreenCommandWrite {
597+
expires_in_s?: number;
598+
}
599+
600+
/**
601+
* One reboot or reload asked of a screen, in Screen.commands (oldest first, at
602+
* most 10). expired is derived by the server on read for a queued command past
603+
* expires_at; a reload never reaches done.
604+
*/
605+
export interface ScreenCommand {
606+
id: string;
607+
type: "reboot" | "reload";
608+
state: "queued" | "sent" | "done" | "expired" | "cancelled" | "superseded";
609+
requested_at: string;
610+
expires_at: string;
611+
sent_at?: string;
612+
done_at?: string;
613+
}
614+
615+
/** Screen.suspension: present while the screen shows a notice instead of its content. */
616+
export interface ScreenSuspension {
617+
message: string;
618+
since: string;
619+
}
620+
621+
/** Write body for POST /api/screens/{id}/identify; duration_ms is omitted so the server can default it (60000). */
622+
export interface ScreenIdentifyWrite {
623+
duration_ms?: number;
624+
}
625+
626+
/** Accepted POST /api/screens/{id}/identify. A Player acts on one identify_id at most once and ignores it after expires_at. */
627+
export interface ScreenIdentifyAccepted {
628+
identify_id: string;
629+
duration_ms: number;
630+
expires_at: string;
631+
}
632+
633+
/** Write body for POST /api/screens/{id}/suspend. */
634+
export interface ScreenSuspendWrite {
635+
message: string;
636+
}
637+
638+
/** Write body for POST /api/screens/{id}/replace: the screen whose paired device takes over the screen in the path. */
639+
export interface ScreenReplaceWrite {
640+
with: string;
589641
}
590642

591643
/** Write body for POST /api/screens/{id}/play-page. */
@@ -708,14 +760,21 @@ export interface Screen {
708760
recovery_pending?: ScreenRecoveryPending;
709761
/**
710762
* Present only while archived: what archived the screen. Known values are
711-
* project, device_reset, and device_unpair; readers keep a value they do
712-
* not know. Every reason keeps the device binding, so unarchive resumes the
713-
* display with no re-pairing. Absent on screens archived before reasons
714-
* were recorded. Read-only.
763+
* project, device_reset, device_unpair, and replaced; readers keep a value
764+
* they do not know. Every reason but replaced keeps the device binding, so
765+
* unarchive resumes the display with no re-pairing; a replaced screen keeps
766+
* none and is deleted, not restored. Absent on screens archived before
767+
* reasons were recorded. Read-only.
715768
*/
716769
archive_reason?: string;
717770
/** Present only while archived with archive_reason. Instant the screen was archived. Read-only. */
718771
archived_at?: string;
772+
/** Present when archive_reason is replaced: the screen this screen's device moved to (screen replace). Read-only. */
773+
replaced_by?: string;
774+
/** The reboots and reloads asked of this screen, oldest first, at most 10. Absent when it has none. Read-only: screen reboot and reload add to it, screen command cancel cancels a queued entry. */
775+
commands?: ScreenCommand[];
776+
/** Present while the screen shows a notice instead of its content (screen suspend). Read-only. */
777+
suspension?: ScreenSuspension;
719778
/**
720779
* Present while the paired Player cannot show the application or iframe
721780
* primitives its manifest carries. at is when the condition began. The
@@ -808,7 +867,7 @@ export type ScreenActionSelector =
808867
/** One fleet action, discriminated by type. New action types are additive. */
809868
export type ScreenAction =
810869
| { type: "assign"; playlist_id: string }
811-
| { type: "reload" }
870+
| ({ type: "reload" } & ScreenCommandWrite)
812871
| ({ type: "toast" } & ScreenToastWrite)
813872
| { type: "set_tags"; tags: ScreenTags }
814873
| { type: "add_tags"; tags: string[] }
@@ -817,7 +876,7 @@ export type ScreenAction =
817876
| { type: "takeover_clear" }
818877
| { type: "set_playlist_schedule"; entries: ScreenScheduleEntryWrite[] }
819878
| { type: "clear_playlist_schedule" }
820-
| { type: "reboot" }
879+
| ({ type: "reboot" } & ScreenCommandWrite)
821880
| { type: "display"; power: "on" | "off"; until?: string | null }
822881
| { type: "display_clear" }
823882
| { type: "set_display_schedule"; enabled: boolean; windows: ScreenScheduleWindow[] }
@@ -906,6 +965,7 @@ export interface ScreenToastAccepted {
906965
export interface ScreenReloadAccepted {
907966
reload_id: string;
908967
expires_at: string;
968+
state: ScreenCommandDelivery;
909969
}
910970

911971
/** shot_ plus 16 to 64 unpadded base64url characters. */

0 commit comments

Comments
 (0)