···11--- original
22+++ modified
33-@@ -0,0 +1,29 @@
33+@@ -0,0 +1,38 @@
44+/* This Source Code Form is subject to the terms of the Mozilla Public
55+ * License, v. 2.0. If a copy of the MPL was not distributed with this
66+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
···2424+
2525+ // Resolves with the logged in user DID if any, rejects otherwise.
2626+ Promise<AtProtoSession> current();
2727++
2828++ // Authorize an origin for write operations via at:// protocol.
2929++ Promise<undefined> authorizeOrigin(USVString origin);
3030++
3131++ // Revoke an origin's write authorization.
3232++ Promise<undefined> revokeOrigin(USVString origin);
3333++
3434++ // Get the list of authorized origins.
3535++ Promise<sequence<DOMString>> authorizedOrigins();
2736+};
2837+
2938+partial interface Navigator {
···8686 /// Specifies the information required to load an iframe.
8787 #[derive(Debug, Deserialize, Serialize)]
8888 pub struct IFrameLoadInfo {
8989-@@ -541,6 +579,79 @@
8989+@@ -541,6 +579,90 @@
9090 NoLongerActive,
9191 }
9292···9696+ Login(String, String),
9797+ Logout,
9898+ Current,
9999++ /// Authorize an origin for write operations via at:// protocol.
100100++ AuthorizeOrigin(String),
101101++ /// Revoke an origin's write authorization.
102102++ RevokeOrigin(String),
103103++ /// Get the list of authorized origins.
104104++ GetAuthorizedOrigins,
99105+}
100106+
101107+/// Data returned by com.atproto.server.createSession xrpc calls.
···108114+ pub did: String,
109115+ pub email: String,
110116+ pub email_confirmed: bool,
117117++ #[serde(default)]
111118+ pub email_auth_factor: bool,
112119+ pub active: bool,
113120+ pub status: Option<String>,
···159166+ NewSession(AtProtoNewSession, ServoUrl), // (session, endpoint_url)
160167+ CurrentSession(AtProtoCurrentSession),
161168+ RefreshRequired,
162162-+ Logout, // For Logout success
169169++ Logout,
170170++ /// List of authorized origins for write operations.
171171++ AuthorizedOrigins(Vec<String>),
172172++ /// Origin authorization was updated successfully.
173173++ OriginUpdated,
163174+ Error,
164175+}
165176+
166177 /// Messages from the script to the constellation.
167178 #[derive(Deserialize, IntoStaticStr, Serialize)]
168179 pub enum ScriptToConstellationMessage {
169169-@@ -585,6 +696,10 @@
180180+@@ -585,6 +707,10 @@
170181 NewBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin),
171182 /// A global stopped managing broadcast channels for a given channel-name.
172183 RemoveBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin),
···177188 /// Broadcast a message to all same-origin broadcast channels,
178189 /// excluding the source of the broadcast.
179190 ScheduleBroadcast(BroadcastChannelRouterId, BroadcastChannelMsg),
180180-@@ -597,6 +712,9 @@
191191+@@ -597,6 +723,9 @@
181192 Option<String>,
182193 Option<String>,
183194 ),
···187198 /// Indicates whether this pipeline is currently running animations.
188199 ChangeRunningAnimationsState(AnimationState),
189200 /// Requests that a new 2D canvas thread be created. (This is done in the constellation because
190190-@@ -677,6 +795,10 @@
201201+@@ -677,6 +806,10 @@
191202 ScriptNewIFrame(IFrameLoadInfoWithData),
192203 /// Script has opened a new auxiliary browsing context.
193204 CreateAuxiliaryWebView(AuxiliaryWebViewCreationRequest),
···198209 /// Mark a new document as active
199210 ActivateDocument,
200211 /// Set the document state for a pipeline (used by screenshot / reftests)
201201-@@ -726,6 +848,79 @@
212212+@@ -726,6 +859,79 @@
202213 RespondToScreenshotReadinessRequest(ScreenshotReadinessResponse),
203214 /// Request the constellation to force garbage collection in all `ScriptThread`'s.
204215 TriggerGarbageCollection,