diff --git a/src/WebExtensions.Net/Extensions/Events/Event.cs b/src/WebExtensions.Net/Extensions/Events/Event.cs index a03371e..7de113d 100644 --- a/src/WebExtensions.Net/Extensions/Events/Event.cs +++ b/src/WebExtensions.Net/Extensions/Events/Event.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using JsBind.Net; namespace WebExtensions.Net.Events { @@ -7,6 +8,7 @@ public partial class Event { /// Registers an event listener callback to an event. /// Called when an event occurs. The parameters of this function depend on the type of event. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Delegate callback) { return InvokeVoidAsync("addListener", callback); @@ -15,6 +17,7 @@ public virtual ValueTask AddListener(Delegate callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Delegate callback) { return InvokeAsync("hasListener", callback); @@ -22,6 +25,7 @@ public virtual ValueTask HasListener(Delegate callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Delegate callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Extensions/Menus/IContextMenusApi.cs b/src/WebExtensions.Net/Extensions/Menus/IContextMenusApi.cs index 420c0ff..7434a87 100644 --- a/src/WebExtensions.Net/Extensions/Menus/IContextMenusApi.cs +++ b/src/WebExtensions.Net/Extensions/Menus/IContextMenusApi.cs @@ -1,6 +1,9 @@ -namespace WebExtensions.Net.Menus +using JsBind.Net; + +namespace WebExtensions.Net.Menus { /// + [JsAccessPath("contextMenus")] public partial interface IContextMenusApi : IMenusApi { } diff --git a/src/WebExtensions.Net/Extensions/Menus/IWebExtensionsApi.cs b/src/WebExtensions.Net/Extensions/Menus/IWebExtensionsApi.cs index 450fa43..f7a7067 100644 --- a/src/WebExtensions.Net/Extensions/Menus/IWebExtensionsApi.cs +++ b/src/WebExtensions.Net/Extensions/Menus/IWebExtensionsApi.cs @@ -1,10 +1,12 @@ -using WebExtensions.Net.Menus; +using JsBind.Net; +using WebExtensions.Net.Menus; namespace WebExtensions.Net { public partial interface IWebExtensionsApi { /// The part of the menus API that is available in all extension contexts, including content scripts. Use the browser.contextMenus API to add items to the browser's menus. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.
Requires manifest permission menus, menus.
+ [JsAccessPath("contextMenus")] IContextMenusApi ContextMenus { get; } } } diff --git a/src/WebExtensions.Net/Extensions/Notifications/INotificationsApi.cs b/src/WebExtensions.Net/Extensions/Notifications/INotificationsApi.cs index d049214..2a8a2ed 100644 --- a/src/WebExtensions.Net/Extensions/Notifications/INotificationsApi.cs +++ b/src/WebExtensions.Net/Extensions/Notifications/INotificationsApi.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using JsBind.Net; namespace WebExtensions.Net.Notifications { @@ -8,6 +9,7 @@ public partial interface INotificationsApi /// Identifier of the notification. /// Contents of the notification. /// Indicates whether a matching notification is updated. + [JsAccessPath("update")] ValueTask Update(string notificationId, NotificationOptions options); } } diff --git a/src/WebExtensions.Net/Extensions/Runtime/OnMessageEvent.cs b/src/WebExtensions.Net/Extensions/Runtime/OnMessageEvent.cs index e1bd7f0..fe3169d 100644 --- a/src/WebExtensions.Net/Extensions/Runtime/OnMessageEvent.cs +++ b/src/WebExtensions.Net/Extensions/Runtime/OnMessageEvent.cs @@ -1,6 +1,5 @@ using System; using System.Threading.Tasks; -using WebExtensions.Net.Runtime; using JsBind.Net; namespace WebExtensions.Net.Runtime @@ -9,6 +8,7 @@ public partial class OnMessageEvent { /// Registers an event listener callback to an event. /// Fired when a message is sent from either an extension process or a content script. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Func, bool> callback) { return InvokeVoidAsync("addListener", callback); @@ -17,6 +17,7 @@ public virtual ValueTask AddListener(Func, /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Func, bool> callback) { return InvokeAsync("hasListener", callback); @@ -24,6 +25,7 @@ public virtual ValueTask HasListener(FuncDeregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Func, bool> callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Extensions/Runtime/Port.cs b/src/WebExtensions.Net/Extensions/Runtime/Port.cs index 7a135b5..f5d2817 100644 --- a/src/WebExtensions.Net/Extensions/Runtime/Port.cs +++ b/src/WebExtensions.Net/Extensions/Runtime/Port.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using JsBind.Net; namespace WebExtensions.Net.Runtime { @@ -6,6 +7,7 @@ public partial class Port { /// Post a message to the port. /// JSON-serializable message. + [JsAccessPath("postMessage")] public virtual ValueTask PostMessage(object message) { return InvokeVoidAsync("postMessage", message); diff --git a/src/WebExtensions.Net/Generated/Action/Details.cs b/src/WebExtensions.Net/Generated/Action/Details.cs index fb32343..1ab138b 100644 --- a/src/WebExtensions.Net/Generated/Action/Details.cs +++ b/src/WebExtensions.Net/Generated/Action/Details.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.ActionNs public partial class Details : BaseObject { /// When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TabId { get; set; } /// When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited. + [JsAccessPath("windowId")] [JsonPropertyName("windowId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? WindowId { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/IActionApi.cs b/src/WebExtensions.Net/Generated/Action/IActionApi.cs index 3a80099..cdfae5c 100644 --- a/src/WebExtensions.Net/Generated/Action/IActionApi.cs +++ b/src/WebExtensions.Net/Generated/Action/IActionApi.cs @@ -1,79 +1,98 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.ActionNs { /// Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup. + [JsAccessPath("action")] public partial interface IActionApi { /// Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. + [JsAccessPath("onClicked")] OnClickedEvent OnClicked { get; } /// Disables the browser action for a tab. /// The id of the tab for which you want to modify the browser action. + [JsAccessPath("disable")] ValueTask Disable(int? tabId = null); /// Enables the browser action for a tab. By default, browser actions are enabled. /// The id of the tab for which you want to modify the browser action. + [JsAccessPath("enable")] ValueTask Enable(int? tabId = null); /// Gets the background color of the browser action badge. /// /// + [JsAccessPath("getBadgeBackgroundColor")] ValueTask GetBadgeBackgroundColor(Details details); /// Gets the badge text of the browser action. If no tab nor window is specified is specified, the global badge text is returned. /// /// + [JsAccessPath("getBadgeText")] ValueTask GetBadgeText(Details details); /// Gets the text color of the browser action badge. /// + [JsAccessPath("getBadgeTextColor")] ValueTask GetBadgeTextColor(Details details); /// Gets the html document set as the popup for this browser action. /// /// + [JsAccessPath("getPopup")] ValueTask GetPopup(Details details); /// Gets the title of the browser action. /// /// + [JsAccessPath("getTitle")] ValueTask GetTitle(Details details); /// Returns the user-specified settings relating to an extension's action. /// The collection of user-specified settings relating to an extension's action. + [JsAccessPath("getUserSettings")] ValueTask GetUserSettings(); /// Checks whether the browser action is enabled. /// + [JsAccessPath("isEnabled")] ValueTask IsEnabled(Details details); /// Opens the extension popup window in the specified window. /// An object with information about the popup to open. + [JsAccessPath("openPopup")] ValueTask OpenPopup(Options options = null); /// Sets the background color for the badge. /// + [JsAccessPath("setBadgeBackgroundColor")] ValueTask SetBadgeBackgroundColor(SetBadgeBackgroundColorDetails details); /// Sets the badge text for the browser action. The badge is displayed on top of the icon. /// + [JsAccessPath("setBadgeText")] ValueTask SetBadgeText(SetBadgeTextDetails details); /// Sets the text color for the badge. /// + [JsAccessPath("setBadgeTextColor")] ValueTask SetBadgeTextColor(SetBadgeTextColorDetails details); /// Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the 'b'path'/b' or the 'b'imageData'/b' property must be specified. /// + [JsAccessPath("setIcon")] ValueTask SetIcon(SetIconDetails details); /// Sets the html document to be opened as a popup when the user clicks on the browser action's icon. /// + [JsAccessPath("setPopup")] ValueTask SetPopup(SetPopupDetails details); /// Sets the title of the browser action. This shows up in the tooltip. /// + [JsAccessPath("setTitle")] ValueTask SetTitle(SetTitleDetails details); } } diff --git a/src/WebExtensions.Net/Generated/Action/OnClickData.cs b/src/WebExtensions.Net/Generated/Action/OnClickData.cs index 678a8fd..c6c6cc0 100644 --- a/src/WebExtensions.Net/Generated/Action/OnClickData.cs +++ b/src/WebExtensions.Net/Generated/Action/OnClickData.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.ActionNs public partial class OnClickData : BaseObject { /// An integer value of button by which menu item was clicked. + [JsAccessPath("button")] [JsonPropertyName("button")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Button { get; set; } /// An array of keyboard modifiers that were held while the menu item was clicked. + [JsAccessPath("modifiers")] [JsonPropertyName("modifiers")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Modifiers { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/OnClickedEvent.cs b/src/WebExtensions.Net/Generated/Action/OnClickedEvent.cs index 9adf295..eeddb5a 100644 --- a/src/WebExtensions.Net/Generated/Action/OnClickedEvent.cs +++ b/src/WebExtensions.Net/Generated/Action/OnClickedEvent.cs @@ -13,6 +13,7 @@ public partial class OnClickedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -21,6 +22,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -28,6 +30,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Action/Options.cs b/src/WebExtensions.Net/Generated/Action/Options.cs index 6c7d7e8..c52f7e5 100644 --- a/src/WebExtensions.Net/Generated/Action/Options.cs +++ b/src/WebExtensions.Net/Generated/Action/Options.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ActionNs public partial class Options : BaseObject { /// Defaults to the $(topic:current-window)[current window]. + [JsAccessPath("windowId")] [JsonPropertyName("windowId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? WindowId { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/SetBadgeBackgroundColorDetails.cs b/src/WebExtensions.Net/Generated/Action/SetBadgeBackgroundColorDetails.cs index 000316d..cbdefed 100644 --- a/src/WebExtensions.Net/Generated/Action/SetBadgeBackgroundColorDetails.cs +++ b/src/WebExtensions.Net/Generated/Action/SetBadgeBackgroundColorDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ActionNs public partial class SetBadgeBackgroundColorDetails : BaseObject { /// + [JsAccessPath("color")] [JsonPropertyName("color")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ColorValue Color { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/SetBadgeTextColorDetails.cs b/src/WebExtensions.Net/Generated/Action/SetBadgeTextColorDetails.cs index 868f217..d23e0d8 100644 --- a/src/WebExtensions.Net/Generated/Action/SetBadgeTextColorDetails.cs +++ b/src/WebExtensions.Net/Generated/Action/SetBadgeTextColorDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ActionNs public partial class SetBadgeTextColorDetails : BaseObject { /// + [JsAccessPath("color")] [JsonPropertyName("color")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ColorValue Color { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/SetBadgeTextDetails.cs b/src/WebExtensions.Net/Generated/Action/SetBadgeTextDetails.cs index f75fc53..59c6fe3 100644 --- a/src/WebExtensions.Net/Generated/Action/SetBadgeTextDetails.cs +++ b/src/WebExtensions.Net/Generated/Action/SetBadgeTextDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ActionNs public partial class SetBadgeTextDetails : BaseObject { /// Any number of characters can be passed, but only about four can fit in the space. + [JsAccessPath("text")] [JsonPropertyName("text")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Text Text { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/SetIconDetails.cs b/src/WebExtensions.Net/Generated/Action/SetIconDetails.cs index 420ceed..44e9e88 100644 --- a/src/WebExtensions.Net/Generated/Action/SetIconDetails.cs +++ b/src/WebExtensions.Net/Generated/Action/SetIconDetails.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.ActionNs public partial class SetIconDetails : BaseObject { /// Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' + [JsAccessPath("imageData")] [JsonPropertyName("imageData")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ImageData ImageData { get; set; } /// Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' + [JsAccessPath("path")] [JsonPropertyName("path")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Path Path { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/SetPopupDetails.cs b/src/WebExtensions.Net/Generated/Action/SetPopupDetails.cs index f6427bd..31611f2 100644 --- a/src/WebExtensions.Net/Generated/Action/SetPopupDetails.cs +++ b/src/WebExtensions.Net/Generated/Action/SetPopupDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ActionNs public partial class SetPopupDetails : BaseObject { /// The html file to show in a popup. If set to the empty string (''), no popup is shown. + [JsAccessPath("popup")] [JsonPropertyName("popup")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Popup Popup { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/SetTitleDetails.cs b/src/WebExtensions.Net/Generated/Action/SetTitleDetails.cs index e55689a..f49f74f 100644 --- a/src/WebExtensions.Net/Generated/Action/SetTitleDetails.cs +++ b/src/WebExtensions.Net/Generated/Action/SetTitleDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ActionNs public partial class SetTitleDetails : BaseObject { /// The string the browser action should display when moused over. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Title Title { get; set; } diff --git a/src/WebExtensions.Net/Generated/Action/UserSettings.cs b/src/WebExtensions.Net/Generated/Action/UserSettings.cs index 1f05d86..c625de9 100644 --- a/src/WebExtensions.Net/Generated/Action/UserSettings.cs +++ b/src/WebExtensions.Net/Generated/Action/UserSettings.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ActionNs public partial class UserSettings : BaseObject { /// Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user). + [JsAccessPath("isOnToolbar")] [JsonPropertyName("isOnToolbar")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IsOnToolbar { get; set; } diff --git a/src/WebExtensions.Net/Generated/Alarms/Alarm.cs b/src/WebExtensions.Net/Generated/Alarms/Alarm.cs index 2facf7b..d86f6e6 100644 --- a/src/WebExtensions.Net/Generated/Alarms/Alarm.cs +++ b/src/WebExtensions.Net/Generated/Alarms/Alarm.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Alarms public partial class Alarm : BaseObject { /// Name of this alarm. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// When present, signals that the alarm triggers periodically after so many minutes. + [JsAccessPath("periodInMinutes")] [JsonPropertyName("periodInMinutes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? PeriodInMinutes { get; set; } /// Time when the alarm is scheduled to fire, in milliseconds past the epoch. + [JsAccessPath("scheduledTime")] [JsonPropertyName("scheduledTime")] public EpochTime ScheduledTime { get; set; } } diff --git a/src/WebExtensions.Net/Generated/Alarms/AlarmInfo.cs b/src/WebExtensions.Net/Generated/Alarms/AlarmInfo.cs index e776947..0bd2986 100644 --- a/src/WebExtensions.Net/Generated/Alarms/AlarmInfo.cs +++ b/src/WebExtensions.Net/Generated/Alarms/AlarmInfo.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Alarms public partial class AlarmInfo : BaseObject { /// Number of minutes from the current time after which the alarm should first fire. + [JsAccessPath("delayInMinutes")] [JsonPropertyName("delayInMinutes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? DelayInMinutes { get; set; } /// Number of minutes after which the alarm should recur repeatedly. + [JsAccessPath("periodInMinutes")] [JsonPropertyName("periodInMinutes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? PeriodInMinutes { get; set; } /// Time when the alarm is scheduled to first fire, in milliseconds past the epoch. + [JsAccessPath("when")] [JsonPropertyName("when")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public EpochTime? When { get; set; } diff --git a/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs b/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs index c83f55b..4ed34b7 100644 --- a/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs +++ b/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs @@ -1,39 +1,48 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.Alarms { /// + [JsAccessPath("alarms")] public partial interface IAlarmsApi { /// Fired when an alarm has expired. Useful for transient background pages. + [JsAccessPath("onAlarm")] OnAlarmEvent OnAlarm { get; } /// Clears the alarm with the given name. /// The name of the alarm to clear. Defaults to the empty string. /// Whether an alarm of the given name was found to clear. + [JsAccessPath("clear")] ValueTask Clear(string name = null); /// Clears all alarms. /// Whether any alarm was found to clear. + [JsAccessPath("clearAll")] ValueTask ClearAll(); /// Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm. /// Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes. + [JsAccessPath("create")] ValueTask Create(AlarmInfo alarmInfo); /// Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm. /// Optional name to identify this alarm. Defaults to the empty string. /// Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes. + [JsAccessPath("create")] ValueTask Create(string name, AlarmInfo alarmInfo); /// Retrieves details about the specified alarm. /// The name of the alarm to get. Defaults to the empty string. /// + [JsAccessPath("get")] ValueTask Get(string name = null); /// Gets an array of all the alarms. /// + [JsAccessPath("getAll")] ValueTask> GetAll(); } } diff --git a/src/WebExtensions.Net/Generated/Alarms/OnAlarmEvent.cs b/src/WebExtensions.Net/Generated/Alarms/OnAlarmEvent.cs index 88b87c7..5cd7630 100644 --- a/src/WebExtensions.Net/Generated/Alarms/OnAlarmEvent.cs +++ b/src/WebExtensions.Net/Generated/Alarms/OnAlarmEvent.cs @@ -12,6 +12,7 @@ public partial class OnAlarmEvent : Event { /// Registers an event listener callback to an event. /// Fired when an alarm has expired. Useful for transient background pages. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Bookmarks/BookmarkTreeNode.cs b/src/WebExtensions.Net/Generated/Bookmarks/BookmarkTreeNode.cs index 3bec33f..7b1a2f1 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/BookmarkTreeNode.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/BookmarkTreeNode.cs @@ -10,51 +10,61 @@ namespace WebExtensions.Net.Bookmarks public partial class BookmarkTreeNode : BaseObject { /// An ordered list of children of this node. + [JsAccessPath("children")] [JsonPropertyName("children")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Children { get; set; } /// When this node was created, in milliseconds since the epoch (new Date(dateAdded)). + [JsAccessPath("dateAdded")] [JsonPropertyName("dateAdded")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public EpochTime? DateAdded { get; set; } /// When the contents of this folder last changed, in milliseconds since the epoch. + [JsAccessPath("dateGroupModified")] [JsonPropertyName("dateGroupModified")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public EpochTime? DateGroupModified { get; set; } /// The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted. + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Id { get; set; } /// The 0-based position of this node within its parent folder. + [JsAccessPath("index")] [JsonPropertyName("index")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Index { get; set; } /// The id of the parent folder. Omitted for the root node. + [JsAccessPath("parentId")] [JsonPropertyName("parentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ParentId { get; set; } /// The text displayed for the node. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or separator. + [JsAccessPath("type")] [JsonPropertyName("type")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BookmarkTreeNodeType? Type { get; set; } /// Indicates the reason why this node is unmodifiable. The managed value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default). + [JsAccessPath("unmodifiable")] [JsonPropertyName("unmodifiable")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BookmarkTreeNodeUnmodifiable? Unmodifiable { get; set; } /// The URL navigated to when a user clicks the bookmark. Omitted for folders. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Bookmarks/ChangeInfo.cs b/src/WebExtensions.Net/Generated/Bookmarks/ChangeInfo.cs index f0814f1..94b3a1f 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/ChangeInfo.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/ChangeInfo.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Bookmarks public partial class ChangeInfo : BaseObject { /// + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Bookmarks/Changes.cs b/src/WebExtensions.Net/Generated/Bookmarks/Changes.cs index a2bf44e..801a020 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/Changes.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/Changes.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Bookmarks public partial class Changes : BaseObject { /// + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Bookmarks/CreateDetails.cs b/src/WebExtensions.Net/Generated/Bookmarks/CreateDetails.cs index c50bdf6..24512ea 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/CreateDetails.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/CreateDetails.cs @@ -9,26 +9,31 @@ namespace WebExtensions.Net.Bookmarks public partial class CreateDetails : BaseObject { /// + [JsAccessPath("index")] [JsonPropertyName("index")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Index { get; set; } /// Defaults to the Other Bookmarks folder. + [JsAccessPath("parentId")] [JsonPropertyName("parentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ParentId { get; set; } /// + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// Indicates the type of BookmarkTreeNode to create, which can be one of bookmark, folder or separator. + [JsAccessPath("type")] [JsonPropertyName("type")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BookmarkTreeNodeType? Type { get; set; } /// + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Bookmarks/Destination.cs b/src/WebExtensions.Net/Generated/Bookmarks/Destination.cs index 7f88094..ba6020b 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/Destination.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/Destination.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Bookmarks public partial class Destination : BaseObject { /// + [JsAccessPath("index")] [JsonPropertyName("index")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Index { get; set; } /// + [JsAccessPath("parentId")] [JsonPropertyName("parentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ParentId { get; set; } diff --git a/src/WebExtensions.Net/Generated/Bookmarks/IBookmarksApi.cs b/src/WebExtensions.Net/Generated/Bookmarks/IBookmarksApi.cs index f9d6588..974e1b5 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/IBookmarksApi.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/IBookmarksApi.cs @@ -1,85 +1,104 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.Bookmarks { /// Use the browser.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see $(topic:override)[Override Pages], which you can use to create a custom Bookmark Manager page. + [JsAccessPath("bookmarks")] public partial interface IBookmarksApi { /// Fired when a bookmark or folder changes. 'b'Note:'/b' Currently, only title and url changes trigger this. + [JsAccessPath("onChanged")] OnChangedEvent OnChanged { get; } /// Fired when a bookmark or folder is created. + [JsAccessPath("onCreated")] OnCreatedEvent OnCreated { get; } /// Fired when a bookmark or folder is moved to a different parent folder. + [JsAccessPath("onMoved")] OnMovedEvent OnMoved { get; } /// Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents. + [JsAccessPath("onRemoved")] OnRemovedEvent OnRemoved { get; } /// Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder. /// /// + [JsAccessPath("create")] ValueTask Create(CreateDetails bookmark); /// Retrieves the specified BookmarkTreeNode(s). /// A single string-valued id, or an array of string-valued ids /// + [JsAccessPath("get")] ValueTask> Get(string idOrIdList); /// Retrieves the specified BookmarkTreeNode(s). /// A single string-valued id, or an array of string-valued ids /// + [JsAccessPath("get")] ValueTask> Get(IEnumerable idOrIdList); /// Retrieves the children of the specified BookmarkTreeNode id. /// /// + [JsAccessPath("getChildren")] ValueTask> GetChildren(string id); /// Retrieves the recently added bookmarks. /// The maximum number of items to return. /// + [JsAccessPath("getRecent")] ValueTask> GetRecent(int numberOfItems); /// Retrieves part of the Bookmarks hierarchy, starting at the specified node. /// The ID of the root of the subtree to retrieve. /// + [JsAccessPath("getSubTree")] ValueTask> GetSubTree(string id); /// Retrieves the entire Bookmarks hierarchy. /// + [JsAccessPath("getTree")] ValueTask> GetTree(); /// Moves the specified BookmarkTreeNode to the provided location. /// /// /// + [JsAccessPath("move")] ValueTask Move(string id, Destination destination); /// Removes a bookmark or an empty bookmark folder. /// + [JsAccessPath("remove")] ValueTask Remove(string id); /// Recursively removes a bookmark folder. /// + [JsAccessPath("removeTree")] ValueTask RemoveTree(string id); /// Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties. /// Either a string of words that are matched against bookmark URLs and titles, or an object. If an object, the properties query, url, and title may be specified and bookmarks matching all specified properties will be produced. /// + [JsAccessPath("search")] ValueTask> Search(string query); /// Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties. /// Either a string of words that are matched against bookmark URLs and titles, or an object. If an object, the properties query, url, and title may be specified and bookmarks matching all specified properties will be produced. /// + [JsAccessPath("search")] ValueTask> Search(object query); /// Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. 'b'Note:'/b' Currently, only 'title' and 'url' are supported. /// /// /// + [JsAccessPath("update")] ValueTask Update(string id, Changes changes); } } diff --git a/src/WebExtensions.Net/Generated/Bookmarks/MoveInfo.cs b/src/WebExtensions.Net/Generated/Bookmarks/MoveInfo.cs index 5e675a4..305b50d 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/MoveInfo.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/MoveInfo.cs @@ -9,19 +9,23 @@ namespace WebExtensions.Net.Bookmarks public partial class MoveInfo : BaseObject { /// + [JsAccessPath("index")] [JsonPropertyName("index")] public int Index { get; set; } /// + [JsAccessPath("oldIndex")] [JsonPropertyName("oldIndex")] public int OldIndex { get; set; } /// + [JsAccessPath("oldParentId")] [JsonPropertyName("oldParentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string OldParentId { get; set; } /// + [JsAccessPath("parentId")] [JsonPropertyName("parentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ParentId { get; set; } diff --git a/src/WebExtensions.Net/Generated/Bookmarks/OnChangedEvent.cs b/src/WebExtensions.Net/Generated/Bookmarks/OnChangedEvent.cs index 6ed0cb8..8d1ea7c 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/OnChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/OnChangedEvent.cs @@ -12,6 +12,7 @@ public partial class OnChangedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a bookmark or folder changes. 'b'Note:'/b' Currently, only title and url changes trigger this. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Bookmarks/OnCreatedEvent.cs b/src/WebExtensions.Net/Generated/Bookmarks/OnCreatedEvent.cs index d571a07..4f33b26 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/OnCreatedEvent.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/OnCreatedEvent.cs @@ -12,6 +12,7 @@ public partial class OnCreatedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a bookmark or folder is created. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action call /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Bookmarks/OnMovedEvent.cs b/src/WebExtensions.Net/Generated/Bookmarks/OnMovedEvent.cs index aa3b58d..f5a2f01 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/OnMovedEvent.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/OnMovedEvent.cs @@ -12,6 +12,7 @@ public partial class OnMovedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a bookmark or folder is moved to a different parent folder. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Bookmarks/OnRemovedEvent.cs b/src/WebExtensions.Net/Generated/Bookmarks/OnRemovedEvent.cs index 9abae1f..e7c8e98 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/OnRemovedEvent.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/OnRemovedEvent.cs @@ -12,6 +12,7 @@ public partial class OnRemovedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Bookmarks/RemoveInfo.cs b/src/WebExtensions.Net/Generated/Bookmarks/RemoveInfo.cs index 9839d43..a6e3e5c 100644 --- a/src/WebExtensions.Net/Generated/Bookmarks/RemoveInfo.cs +++ b/src/WebExtensions.Net/Generated/Bookmarks/RemoveInfo.cs @@ -9,15 +9,18 @@ namespace WebExtensions.Net.Bookmarks public partial class RemoveInfo : BaseObject { /// + [JsAccessPath("index")] [JsonPropertyName("index")] public int Index { get; set; } /// + [JsAccessPath("node")] [JsonPropertyName("node")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BookmarkTreeNode Node { get; set; } /// + [JsAccessPath("parentId")] [JsonPropertyName("parentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ParentId { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/Details.cs b/src/WebExtensions.Net/Generated/BrowserAction/Details.cs index 1e42dc0..df869e1 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/Details.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/Details.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.BrowserAction public partial class Details : BaseObject { /// When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TabId { get; set; } /// When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited. + [JsAccessPath("windowId")] [JsonPropertyName("windowId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? WindowId { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs b/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs index 19bfe68..bc50df4 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs @@ -1,74 +1,92 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.BrowserAction { /// Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup. + [JsAccessPath("browserAction")] public partial interface IBrowserActionApi { /// Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. + [JsAccessPath("onClicked")] OnClickedEvent OnClicked { get; } /// Disables the browser action for a tab. /// The id of the tab for which you want to modify the browser action. + [JsAccessPath("disable")] ValueTask Disable(int? tabId = null); /// Enables the browser action for a tab. By default, browser actions are enabled. /// The id of the tab for which you want to modify the browser action. + [JsAccessPath("enable")] ValueTask Enable(int? tabId = null); /// Gets the background color of the browser action badge. /// /// + [JsAccessPath("getBadgeBackgroundColor")] ValueTask GetBadgeBackgroundColor(Details details); /// Gets the badge text of the browser action. If no tab nor window is specified is specified, the global badge text is returned. /// /// + [JsAccessPath("getBadgeText")] ValueTask GetBadgeText(Details details); /// Gets the text color of the browser action badge. /// + [JsAccessPath("getBadgeTextColor")] ValueTask GetBadgeTextColor(Details details); /// Gets the html document set as the popup for this browser action. /// /// + [JsAccessPath("getPopup")] ValueTask GetPopup(Details details); /// Gets the title of the browser action. /// /// + [JsAccessPath("getTitle")] ValueTask GetTitle(Details details); /// Checks whether the browser action is enabled. /// + [JsAccessPath("isEnabled")] ValueTask IsEnabled(Details details); /// Opens the extension popup window in the active window. + [JsAccessPath("openPopup")] ValueTask OpenPopup(); /// Sets the background color for the badge. /// + [JsAccessPath("setBadgeBackgroundColor")] ValueTask SetBadgeBackgroundColor(SetBadgeBackgroundColorDetails details); /// Sets the badge text for the browser action. The badge is displayed on top of the icon. /// + [JsAccessPath("setBadgeText")] ValueTask SetBadgeText(SetBadgeTextDetails details); /// Sets the text color for the badge. /// + [JsAccessPath("setBadgeTextColor")] ValueTask SetBadgeTextColor(SetBadgeTextColorDetails details); /// Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the 'b'path'/b' or the 'b'imageData'/b' property must be specified. /// + [JsAccessPath("setIcon")] ValueTask SetIcon(SetIconDetails details); /// Sets the html document to be opened as a popup when the user clicks on the browser action's icon. /// + [JsAccessPath("setPopup")] ValueTask SetPopup(SetPopupDetails details); /// Sets the title of the browser action. This shows up in the tooltip. /// + [JsAccessPath("setTitle")] ValueTask SetTitle(SetTitleDetails details); } } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/OnClickData.cs b/src/WebExtensions.Net/Generated/BrowserAction/OnClickData.cs index aaa8dd2..ea45f17 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/OnClickData.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/OnClickData.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.BrowserAction public partial class OnClickData : BaseObject { /// An integer value of button by which menu item was clicked. + [JsAccessPath("button")] [JsonPropertyName("button")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Button { get; set; } /// An array of keyboard modifiers that were held while the menu item was clicked. + [JsAccessPath("modifiers")] [JsonPropertyName("modifiers")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Modifiers { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/OnClickedEvent.cs b/src/WebExtensions.Net/Generated/BrowserAction/OnClickedEvent.cs index 8c906c6..05830ef 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/OnClickedEvent.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/OnClickedEvent.cs @@ -13,6 +13,7 @@ public partial class OnClickedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -21,6 +22,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -28,6 +30,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeBackgroundColorDetails.cs b/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeBackgroundColorDetails.cs index 1345e28..bd0951e 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeBackgroundColorDetails.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeBackgroundColorDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.BrowserAction public partial class SetBadgeBackgroundColorDetails : BaseObject { /// + [JsAccessPath("color")] [JsonPropertyName("color")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ColorValue Color { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextColorDetails.cs b/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextColorDetails.cs index 95d1f1c..004b590 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextColorDetails.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextColorDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.BrowserAction public partial class SetBadgeTextColorDetails : BaseObject { /// + [JsAccessPath("color")] [JsonPropertyName("color")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ColorValue Color { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextDetails.cs b/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextDetails.cs index a614a85..237cf24 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextDetails.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/SetBadgeTextDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.BrowserAction public partial class SetBadgeTextDetails : BaseObject { /// Any number of characters can be passed, but only about four can fit in the space. + [JsAccessPath("text")] [JsonPropertyName("text")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Text Text { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/SetIconDetails.cs b/src/WebExtensions.Net/Generated/BrowserAction/SetIconDetails.cs index f06af32..96a72c3 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/SetIconDetails.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/SetIconDetails.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.BrowserAction public partial class SetIconDetails : BaseObject { /// Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' + [JsAccessPath("imageData")] [JsonPropertyName("imageData")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ImageData ImageData { get; set; } /// Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' + [JsAccessPath("path")] [JsonPropertyName("path")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Path Path { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/SetPopupDetails.cs b/src/WebExtensions.Net/Generated/BrowserAction/SetPopupDetails.cs index 912da80..ca75144 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/SetPopupDetails.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/SetPopupDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.BrowserAction public partial class SetPopupDetails : BaseObject { /// The html file to show in a popup. If set to the empty string (''), no popup is shown. + [JsAccessPath("popup")] [JsonPropertyName("popup")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Popup Popup { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/SetTitleDetails.cs b/src/WebExtensions.Net/Generated/BrowserAction/SetTitleDetails.cs index 6bf1c38..7746554 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/SetTitleDetails.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/SetTitleDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.BrowserAction public partial class SetTitleDetails : BaseObject { /// The string the browser action should display when moused over. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Title Title { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowserSettings/ColorManagement/IColorManagementApi.cs b/src/WebExtensions.Net/Generated/BrowserSettings/ColorManagement/IColorManagementApi.cs index 504991f..0206f10 100644 --- a/src/WebExtensions.Net/Generated/BrowserSettings/ColorManagement/IColorManagementApi.cs +++ b/src/WebExtensions.Net/Generated/BrowserSettings/ColorManagement/IColorManagementApi.cs @@ -1,17 +1,22 @@ +using JsBind.Net; using WebExtensions.Net.Types; namespace WebExtensions.Net.BrowserSettings.ColorManagement { /// Use the browserSettings.colorManagement API to query and set items related to color management. + [JsAccessPath("colorManagement")] public partial interface IColorManagementApi { /// This setting controls the mode used for color management and must be a string from $(ref:browserSettings.ColorManagementMode) + [JsAccessPath("mode")] Setting Mode { get; } /// This boolean setting controls whether or not native sRGB color management is used. + [JsAccessPath("useNativeSRGB")] Setting UseNativeSRGB { get; } /// This boolean setting controls whether or not the WebRender compositor is used. + [JsAccessPath("useWebRenderCompositor")] Setting UseWebRenderCompositor { get; } } } diff --git a/src/WebExtensions.Net/Generated/BrowserSettings/IBrowserSettingsApi.cs b/src/WebExtensions.Net/Generated/BrowserSettings/IBrowserSettingsApi.cs index 0e5812f..13f21f0 100644 --- a/src/WebExtensions.Net/Generated/BrowserSettings/IBrowserSettingsApi.cs +++ b/src/WebExtensions.Net/Generated/BrowserSettings/IBrowserSettingsApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using System; using WebExtensions.Net.BrowserSettings.ColorManagement; using WebExtensions.Net.Types; @@ -5,64 +6,84 @@ namespace WebExtensions.Net.BrowserSettings { /// Use the browser.browserSettings API to control global settings of the browser. + [JsAccessPath("browserSettings")] public partial interface IBrowserSettingsApi { /// Use the browserSettings.colorManagement API to query and set items related to color management.
Requires manifest permission browserSettings.
+ [JsAccessPath("colorManagement")] IColorManagementApi ColorManagement { get; } /// Allows or disallows pop-up windows from opening in response to user events. + [JsAccessPath("allowPopupsForUserEvents")] Setting AllowPopupsForUserEvents { get; } /// Enables or disables the browser cache. + [JsAccessPath("cacheEnabled")] Setting CacheEnabled { get; } /// This boolean setting controls whether the selected tab can be closed with a double click. + [JsAccessPath("closeTabsByDoubleClick")] Setting CloseTabsByDoubleClick { get; } /// Controls after which mouse event context menus popup. This setting's value is of type ContextMenuMouseEvent, which has possible values of mouseup and mousedown. + [JsAccessPath("contextMenuShowEvent")] Setting ContextMenuShowEvent { get; } /// Returns whether the FTP protocol is enabled. Read-only. + [JsAccessPath("ftpProtocolEnabled")] [Obsolete("FTP support was removed from Firefox in bug 1574475")] Setting FtpProtocolEnabled { get; } /// Returns the value of the overridden home page. Read-only. + [JsAccessPath("homepageOverride")] Setting HomepageOverride { get; } /// Controls the behaviour of image animation in the browser. This setting's value is of type ImageAnimationBehavior, defaulting to normal. + [JsAccessPath("imageAnimationBehavior")] Setting ImageAnimationBehavior { get; } /// Returns the value of the overridden new tab page. Read-only. + [JsAccessPath("newTabPageOverride")] Setting NewTabPageOverride { get; } /// Controls where new tabs are opened. `afterCurrent` will open all new tabs next to the current tab, `relatedAfterCurrent` will open only related tabs next to the current tab, and `atEnd` will open all tabs at the end of the tab strip. The default is `relatedAfterCurrent`. + [JsAccessPath("newTabPosition")] Setting NewTabPosition { get; } /// This boolean setting controls whether bookmarks are opened in the current tab or in a new tab. + [JsAccessPath("openBookmarksInNewTabs")] Setting OpenBookmarksInNewTabs { get; } /// This boolean setting controls whether search results are opened in the current tab or in a new tab. + [JsAccessPath("openSearchResultsInNewTabs")] Setting OpenSearchResultsInNewTabs { get; } /// This boolean setting controls whether urlbar results are opened in the current tab or in a new tab. + [JsAccessPath("openUrlbarResultsInNewTabs")] Setting OpenUrlbarResultsInNewTabs { get; } /// This setting controls whether a light or dark color scheme overrides the page's preferred color scheme. + [JsAccessPath("overrideContentColorScheme")] Setting OverrideContentColorScheme { get; } /// This setting controls whether the user-chosen colors override the page's colors. + [JsAccessPath("overrideDocumentColors")] Setting OverrideDocumentColors { get; } /// This setting controls whether the document's fonts are used. + [JsAccessPath("useDocumentFonts")] Setting UseDocumentFonts { get; } /// Disables webAPI notifications. + [JsAccessPath("webNotificationsDisabled")] Setting WebNotificationsDisabled { get; } /// This boolean setting controls whether zoom is applied to the full page or to text only. + [JsAccessPath("zoomFullPage")] Setting ZoomFullPage { get; } /// This boolean setting controls whether zoom is applied on a per-site basis or to the current tab only. If privacy.resistFingerprinting is true, this setting has no effect and zoom is applied to the current tab only. + [JsAccessPath("zoomSiteSpecific")] Setting ZoomSiteSpecific { get; } } } diff --git a/src/WebExtensions.Net/Generated/BrowsingData/DataTypeSet.cs b/src/WebExtensions.Net/Generated/BrowsingData/DataTypeSet.cs index a8e1798..5632ca3 100644 --- a/src/WebExtensions.Net/Generated/BrowsingData/DataTypeSet.cs +++ b/src/WebExtensions.Net/Generated/BrowsingData/DataTypeSet.cs @@ -9,56 +9,67 @@ namespace WebExtensions.Net.BrowsingData public partial class DataTypeSet : BaseObject { /// The browser's cache. Note: when removing data, this clears the entire cache: it is not limited to the range you specify. + [JsAccessPath("cache")] [JsonPropertyName("cache")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Cache { get; set; } /// The browser's cookies. + [JsAccessPath("cookies")] [JsonPropertyName("cookies")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Cookies { get; set; } /// The browser's download list. + [JsAccessPath("downloads")] [JsonPropertyName("downloads")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Downloads { get; set; } /// The browser's stored form data. + [JsAccessPath("formData")] [JsonPropertyName("formData")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? FormData { get; set; } /// The browser's history. + [JsAccessPath("history")] [JsonPropertyName("history")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? History { get; set; } /// Websites' IndexedDB data. + [JsAccessPath("indexedDB")] [JsonPropertyName("indexedDB")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IndexedDB { get; set; } /// Websites' local storage data. + [JsAccessPath("localStorage")] [JsonPropertyName("localStorage")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? LocalStorage { get; set; } /// Stored passwords. + [JsAccessPath("passwords")] [JsonPropertyName("passwords")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Passwords { get; set; } /// Plugins' data. + [JsAccessPath("pluginData")] [JsonPropertyName("pluginData")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? PluginData { get; set; } /// Server-bound certificates. + [JsAccessPath("serverBoundCertificates")] [JsonPropertyName("serverBoundCertificates")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ServerBoundCertificates { get; set; } /// Service Workers. + [JsAccessPath("serviceWorkers")] [JsonPropertyName("serviceWorkers")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ServiceWorkers { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowsingData/IBrowsingDataApi.cs b/src/WebExtensions.Net/Generated/BrowsingData/IBrowsingDataApi.cs index 9e81233..9a710e0 100644 --- a/src/WebExtensions.Net/Generated/BrowsingData/IBrowsingDataApi.cs +++ b/src/WebExtensions.Net/Generated/BrowsingData/IBrowsingDataApi.cs @@ -1,49 +1,61 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.BrowsingData { /// Use the chrome.browsingData API to remove browsing data from a user's local profile. + [JsAccessPath("browsingData")] public partial interface IBrowsingDataApi { /// Clears various types of browsing data stored in a user's profile. /// /// The set of data types to remove. + [JsAccessPath("remove")] ValueTask Remove(RemovalOptions options, DataTypeSet dataToRemove); /// Clears the browser's cache. /// + [JsAccessPath("removeCache")] ValueTask RemoveCache(RemovalOptions options); /// Clears the browser's cookies and server-bound certificates modified within a particular timeframe. /// + [JsAccessPath("removeCookies")] ValueTask RemoveCookies(RemovalOptions options); /// Clears the browser's list of downloaded files (not the downloaded files themselves). /// + [JsAccessPath("removeDownloads")] ValueTask RemoveDownloads(RemovalOptions options); /// Clears the browser's stored form data (autofill). /// + [JsAccessPath("removeFormData")] ValueTask RemoveFormData(RemovalOptions options); /// Clears the browser's history. /// + [JsAccessPath("removeHistory")] ValueTask RemoveHistory(RemovalOptions options); /// Clears websites' local storage data. /// + [JsAccessPath("removeLocalStorage")] ValueTask RemoveLocalStorage(RemovalOptions options); /// Clears the browser's stored passwords. /// + [JsAccessPath("removePasswords")] ValueTask RemovePasswords(RemovalOptions options); /// Clears plugins' data. /// + [JsAccessPath("removePluginData")] ValueTask RemovePluginData(RemovalOptions options); /// Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here. /// + [JsAccessPath("settings")] ValueTask Settings(); } } diff --git a/src/WebExtensions.Net/Generated/BrowsingData/OriginTypes.cs b/src/WebExtensions.Net/Generated/BrowsingData/OriginTypes.cs index 407f72b..49c4cb5 100644 --- a/src/WebExtensions.Net/Generated/BrowsingData/OriginTypes.cs +++ b/src/WebExtensions.Net/Generated/BrowsingData/OriginTypes.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.BrowsingData public partial class OriginTypes : BaseObject { /// Extensions and packaged applications a user has installed (be _really_ careful!). + [JsAccessPath("extension")] [JsonPropertyName("extension")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Extension { get; set; } /// Websites that have been installed as hosted applications (be careful!). + [JsAccessPath("protectedWeb")] [JsonPropertyName("protectedWeb")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ProtectedWeb { get; set; } /// Normal websites. + [JsAccessPath("unprotectedWeb")] [JsonPropertyName("unprotectedWeb")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? UnprotectedWeb { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowsingData/RemovalOptions.cs b/src/WebExtensions.Net/Generated/BrowsingData/RemovalOptions.cs index c045ff2..f105f29 100644 --- a/src/WebExtensions.Net/Generated/BrowsingData/RemovalOptions.cs +++ b/src/WebExtensions.Net/Generated/BrowsingData/RemovalOptions.cs @@ -11,21 +11,25 @@ namespace WebExtensions.Net.BrowsingData public partial class RemovalOptions : BaseObject { /// Only remove data associated with this specific cookieStoreId. + [JsAccessPath("cookieStoreId")] [JsonPropertyName("cookieStoreId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string CookieStoreId { get; set; } /// Only remove data associated with these hostnames (only applies to cookies and localStorage). + [JsAccessPath("hostnames")] [JsonPropertyName("hostnames")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Hostnames { get; set; } /// An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you really want to remove application data before adding 'protectedWeb' or 'extensions'. + [JsAccessPath("originTypes")] [JsonPropertyName("originTypes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public OriginTypes OriginTypes { get; set; } /// Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date object). If absent, defaults to 0 (which would remove all browsing data). + [JsAccessPath("since")] [JsonPropertyName("since")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Date Since { get; set; } diff --git a/src/WebExtensions.Net/Generated/BrowsingData/Result.cs b/src/WebExtensions.Net/Generated/BrowsingData/Result.cs index f73ede8..b3699eb 100644 --- a/src/WebExtensions.Net/Generated/BrowsingData/Result.cs +++ b/src/WebExtensions.Net/Generated/BrowsingData/Result.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.BrowsingData public partial class Result : BaseObject { /// All of the types will be present in the result, with values of true if they are permitted to be removed (e.g., by enterprise policy) and false if not. + [JsAccessPath("dataRemovalPermitted")] [JsonPropertyName("dataRemovalPermitted")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DataTypeSet DataRemovalPermitted { get; set; } /// All of the types will be present in the result, with values of true if they are both selected to be removed and permitted to be removed, otherwise false. + [JsAccessPath("dataToRemove")] [JsonPropertyName("dataToRemove")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DataTypeSet DataToRemove { get; set; } /// + [JsAccessPath("options")] [JsonPropertyName("options")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public RemovalOptions Options { get; set; } diff --git a/src/WebExtensions.Net/Generated/Clipboard/IClipboardApi.cs b/src/WebExtensions.Net/Generated/Clipboard/IClipboardApi.cs index 143f232..230467f 100644 --- a/src/WebExtensions.Net/Generated/Clipboard/IClipboardApi.cs +++ b/src/WebExtensions.Net/Generated/Clipboard/IClipboardApi.cs @@ -1,13 +1,16 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.Clipboard { /// Offers the ability to write to the clipboard. Reading is not supported because the clipboard can already be read through the standard web platform APIs. + [JsAccessPath("clipboard")] public partial interface IClipboardApi { /// Copy an image to the clipboard. The image is re-encoded before it is written to the clipboard. If the image is invalid, the clipboard is not modified. /// The image data to be copied. /// The type of imageData. + [JsAccessPath("setImageData")] ValueTask SetImageData(object imageData, string imageType); } } diff --git a/src/WebExtensions.Net/Generated/Commands/ChangeInfo.cs b/src/WebExtensions.Net/Generated/Commands/ChangeInfo.cs index f747cea..9f7b4c9 100644 --- a/src/WebExtensions.Net/Generated/Commands/ChangeInfo.cs +++ b/src/WebExtensions.Net/Generated/Commands/ChangeInfo.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Commands public partial class ChangeInfo : BaseObject { /// The name of the shortcut. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The new shortcut active for this command, or blank if not active. + [JsAccessPath("newShortcut")] [JsonPropertyName("newShortcut")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string NewShortcut { get; set; } /// The old shortcut which is no longer active for this command, or blank if the shortcut was previously inactive. + [JsAccessPath("oldShortcut")] [JsonPropertyName("oldShortcut")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string OldShortcut { get; set; } diff --git a/src/WebExtensions.Net/Generated/Commands/Command.cs b/src/WebExtensions.Net/Generated/Commands/Command.cs index 4188f74..02da3be 100644 --- a/src/WebExtensions.Net/Generated/Commands/Command.cs +++ b/src/WebExtensions.Net/Generated/Commands/Command.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Commands public partial class Command : BaseObject { /// The Extension Command description + [JsAccessPath("description")] [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Description { get; set; } /// The name of the Extension Command + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The shortcut active for this command, or blank if not active. + [JsAccessPath("shortcut")] [JsonPropertyName("shortcut")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Shortcut { get; set; } diff --git a/src/WebExtensions.Net/Generated/Commands/Detail.cs b/src/WebExtensions.Net/Generated/Commands/Detail.cs index be62af6..d7271f0 100644 --- a/src/WebExtensions.Net/Generated/Commands/Detail.cs +++ b/src/WebExtensions.Net/Generated/Commands/Detail.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Commands public partial class Detail : BaseObject { /// The new description for the command. + [JsAccessPath("description")] [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Description { get; set; } /// The name of the command. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// + [JsAccessPath("shortcut")] [JsonPropertyName("shortcut")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Shortcut { get; set; } diff --git a/src/WebExtensions.Net/Generated/Commands/ICommandsApi.cs b/src/WebExtensions.Net/Generated/Commands/ICommandsApi.cs index 2ca5b28..b9e0e9f 100644 --- a/src/WebExtensions.Net/Generated/Commands/ICommandsApi.cs +++ b/src/WebExtensions.Net/Generated/Commands/ICommandsApi.cs @@ -1,27 +1,34 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.Commands { /// Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the xtension. + [JsAccessPath("commands")] public partial interface ICommandsApi { /// Fired when a registered command's shortcut is changed. + [JsAccessPath("onChanged")] OnChangedEvent OnChanged { get; } /// Fired when a registered command is activated using a keyboard shortcut. + [JsAccessPath("onCommand")] OnCommandEvent OnCommand { get; } /// Returns all the registered extension commands for this extension and their shortcut (if active). /// + [JsAccessPath("getAll")] ValueTask> GetAll(); /// Reset a command's details to what is specified in the manifest. /// The name of the command. + [JsAccessPath("reset")] ValueTask Reset(string name); /// Update the details of an already defined command. /// The new description for the command. + [JsAccessPath("update")] ValueTask Update(Detail detail); } } diff --git a/src/WebExtensions.Net/Generated/Commands/OnChangedEvent.cs b/src/WebExtensions.Net/Generated/Commands/OnChangedEvent.cs index 02f98cd..9618196 100644 --- a/src/WebExtensions.Net/Generated/Commands/OnChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/Commands/OnChangedEvent.cs @@ -12,6 +12,7 @@ public partial class OnChangedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a registered command's shortcut is changed. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Commands/OnCommandEvent.cs b/src/WebExtensions.Net/Generated/Commands/OnCommandEvent.cs index fd19541..0552b86 100644 --- a/src/WebExtensions.Net/Generated/Commands/OnCommandEvent.cs +++ b/src/WebExtensions.Net/Generated/Commands/OnCommandEvent.cs @@ -12,6 +12,7 @@ public partial class OnCommandEvent : Event { /// Registers an event listener callback to an event. /// Fired when a registered command is activated using a keyboard shortcut. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/ContentScripts/IContentScriptsApi.cs b/src/WebExtensions.Net/Generated/ContentScripts/IContentScriptsApi.cs index 1358713..766c46e 100644 --- a/src/WebExtensions.Net/Generated/ContentScripts/IContentScriptsApi.cs +++ b/src/WebExtensions.Net/Generated/ContentScripts/IContentScriptsApi.cs @@ -1,12 +1,15 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.ContentScripts { /// + [JsAccessPath("contentScripts")] public partial interface IContentScriptsApi { /// Register a content script programmatically /// + [JsAccessPath("register")] ValueTask Register(RegisteredContentScriptOptions contentScriptOptions); } } diff --git a/src/WebExtensions.Net/Generated/ContentScripts/RegisteredContentScriptOptions.cs b/src/WebExtensions.Net/Generated/ContentScripts/RegisteredContentScriptOptions.cs index bdae2b3..940c036 100644 --- a/src/WebExtensions.Net/Generated/ContentScripts/RegisteredContentScriptOptions.cs +++ b/src/WebExtensions.Net/Generated/ContentScripts/RegisteredContentScriptOptions.cs @@ -12,51 +12,61 @@ namespace WebExtensions.Net.ContentScripts public partial class RegisteredContentScriptOptions : BaseObject { /// If allFrames is true, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's false and is only injected into the top frame. + [JsAccessPath("allFrames")] [JsonPropertyName("allFrames")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? AllFrames { get; set; } /// limit the set of matched tabs to those that belong to the given cookie store id + [JsAccessPath("cookieStoreId")] [JsonPropertyName("cookieStoreId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public CookieStoreId CookieStoreId { get; set; } /// The list of CSS files to inject + [JsAccessPath("css")] [JsonPropertyName("css")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Css { get; set; } /// + [JsAccessPath("excludeGlobs")] [JsonPropertyName("excludeGlobs")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ExcludeGlobs { get; set; } /// + [JsAccessPath("excludeMatches")] [JsonPropertyName("excludeMatches")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ExcludeMatches { get; set; } /// + [JsAccessPath("includeGlobs")] [JsonPropertyName("includeGlobs")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable IncludeGlobs { get; set; } /// The list of JS files to inject + [JsAccessPath("js")] [JsonPropertyName("js")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Js { get; set; } /// If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false. + [JsAccessPath("matchAboutBlank")] [JsonPropertyName("matchAboutBlank")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? MatchAboutBlank { get; set; } /// + [JsAccessPath("matches")] [JsonPropertyName("matches")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Matches { get; set; } /// The soonest that the JavaScript or CSS will be injected into the tab. Defaults to "document_idle". + [JsAccessPath("runAt")] [JsonPropertyName("runAt")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public RunAt? RunAt { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/CallbackDetails.cs b/src/WebExtensions.Net/Generated/Cookies/CallbackDetails.cs index 16b8030..ddb9ddd 100644 --- a/src/WebExtensions.Net/Generated/Cookies/CallbackDetails.cs +++ b/src/WebExtensions.Net/Generated/Cookies/CallbackDetails.cs @@ -9,26 +9,31 @@ namespace WebExtensions.Net.Cookies public partial class CallbackDetails : BaseObject { /// The first-party domain associated with the cookie that's been removed. + [JsAccessPath("firstPartyDomain")] [JsonPropertyName("firstPartyDomain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FirstPartyDomain { get; set; } /// The name of the cookie that's been removed. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The storage partition, if the cookie is part of partitioned storage. null if not partitioned. + [JsAccessPath("partitionKey")] [JsonPropertyName("partitionKey")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public PartitionKey PartitionKey { get; set; } /// The ID of the cookie store from which the cookie was removed. + [JsAccessPath("storeId")] [JsonPropertyName("storeId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StoreId { get; set; } /// The URL associated with the cookie that's been removed. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/ChangeInfo.cs b/src/WebExtensions.Net/Generated/Cookies/ChangeInfo.cs index b404ab9..f821ebd 100644 --- a/src/WebExtensions.Net/Generated/Cookies/ChangeInfo.cs +++ b/src/WebExtensions.Net/Generated/Cookies/ChangeInfo.cs @@ -9,15 +9,18 @@ namespace WebExtensions.Net.Cookies public partial class ChangeInfo : BaseObject { /// The underlying reason behind the cookie's change. + [JsAccessPath("cause")] [JsonPropertyName("cause")] public OnChangedCause Cause { get; set; } /// Information about the cookie that was set or removed. + [JsAccessPath("cookie")] [JsonPropertyName("cookie")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Cookie Cookie { get; set; } /// True if a cookie was removed. + [JsAccessPath("removed")] [JsonPropertyName("removed")] public bool Removed { get; set; } } diff --git a/src/WebExtensions.Net/Generated/Cookies/Cookie.cs b/src/WebExtensions.Net/Generated/Cookies/Cookie.cs index 1c667c6..d27df45 100644 --- a/src/WebExtensions.Net/Generated/Cookies/Cookie.cs +++ b/src/WebExtensions.Net/Generated/Cookies/Cookie.cs @@ -9,61 +9,74 @@ namespace WebExtensions.Net.Cookies public partial class Cookie : BaseObject { /// The domain of the cookie (e.g. "www.google.com", "example.com"). + [JsAccessPath("domain")] [JsonPropertyName("domain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Domain { get; set; } /// The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies. + [JsAccessPath("expirationDate")] [JsonPropertyName("expirationDate")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? ExpirationDate { get; set; } /// The first-party domain of the cookie. + [JsAccessPath("firstPartyDomain")] [JsonPropertyName("firstPartyDomain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FirstPartyDomain { get; set; } /// True if the cookie is a host-only cookie (i.e. a request's host must exactly match the domain of the cookie). + [JsAccessPath("hostOnly")] [JsonPropertyName("hostOnly")] public bool HostOnly { get; set; } /// True if the cookie is marked as HttpOnly (i.e. the cookie is inaccessible to client-side scripts). + [JsAccessPath("httpOnly")] [JsonPropertyName("httpOnly")] public bool HttpOnly { get; set; } /// The name of the cookie. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The cookie's storage partition, if any. null if not partitioned. + [JsAccessPath("partitionKey")] [JsonPropertyName("partitionKey")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public PartitionKey PartitionKey { get; set; } /// The path of the cookie. + [JsAccessPath("path")] [JsonPropertyName("path")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Path { get; set; } /// The cookie's same-site status (i.e. whether the cookie is sent with cross-site requests). + [JsAccessPath("sameSite")] [JsonPropertyName("sameSite")] public SameSiteStatus SameSite { get; set; } /// True if the cookie is marked as Secure (i.e. its scope is limited to secure channels, typically HTTPS). + [JsAccessPath("secure")] [JsonPropertyName("secure")] public bool Secure { get; set; } /// True if the cookie is a session cookie, as opposed to a persistent cookie with an expiration date. + [JsAccessPath("session")] [JsonPropertyName("session")] public bool Session { get; set; } /// The ID of the cookie store containing this cookie, as provided in getAllCookieStores(). + [JsAccessPath("storeId")] [JsonPropertyName("storeId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StoreId { get; set; } /// The value of the cookie. + [JsAccessPath("value")] [JsonPropertyName("value")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Value { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/CookieStore.cs b/src/WebExtensions.Net/Generated/Cookies/CookieStore.cs index 4d41e5c..472d044 100644 --- a/src/WebExtensions.Net/Generated/Cookies/CookieStore.cs +++ b/src/WebExtensions.Net/Generated/Cookies/CookieStore.cs @@ -10,15 +10,18 @@ namespace WebExtensions.Net.Cookies public partial class CookieStore : BaseObject { /// The unique identifier for the cookie store. + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Id { get; set; } /// Indicates if this is an incognito cookie store + [JsAccessPath("incognito")] [JsonPropertyName("incognito")] public bool Incognito { get; set; } /// Identifiers of all the browser tabs that share this cookie store. + [JsAccessPath("tabIds")] [JsonPropertyName("tabIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable TabIds { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/GetAllDetails.cs b/src/WebExtensions.Net/Generated/Cookies/GetAllDetails.cs index 9357656..eec3744 100644 --- a/src/WebExtensions.Net/Generated/Cookies/GetAllDetails.cs +++ b/src/WebExtensions.Net/Generated/Cookies/GetAllDetails.cs @@ -9,46 +9,55 @@ namespace WebExtensions.Net.Cookies public partial class GetAllDetails : BaseObject { /// Restricts the retrieved cookies to those whose domains match or are subdomains of this one. + [JsAccessPath("domain")] [JsonPropertyName("domain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Domain { get; set; } /// Restricts the retrieved cookies to those whose first-party domains match this one. This attribute is required if First-Party Isolation is enabled. To not filter by a specific first-party domain, use `null` or `undefined`. + [JsAccessPath("firstPartyDomain")] [JsonPropertyName("firstPartyDomain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FirstPartyDomain { get; set; } /// Filters the cookies by name. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// Selects a specific storage partition to look up cookies. Defaults to null, in which case only non-partitioned cookies are retrieved. If an object iis passed, partitioned cookies are also included, and filtered based on the keys present in the given PartitionKey description. An empty object ({}) returns all cookies (partitioned + unpartitioned), a non-empty object (e.g. {topLevelSite: '...'}) only returns cookies whose partition match all given attributes. + [JsAccessPath("partitionKey")] [JsonPropertyName("partitionKey")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public PartitionKey PartitionKey { get; set; } /// Restricts the retrieved cookies to those whose path exactly matches this string. + [JsAccessPath("path")] [JsonPropertyName("path")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Path { get; set; } /// Filters the cookies by their Secure property. + [JsAccessPath("secure")] [JsonPropertyName("secure")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Secure { get; set; } /// Filters out session vs. persistent cookies. + [JsAccessPath("session")] [JsonPropertyName("session")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Session { get; set; } /// The cookie store to retrieve cookies from. If omitted, the current execution context's cookie store will be used. + [JsAccessPath("storeId")] [JsonPropertyName("storeId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StoreId { get; set; } /// Restricts the retrieved cookies to those that would match the given URL. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/GetDetails.cs b/src/WebExtensions.Net/Generated/Cookies/GetDetails.cs index 100f124..6e735d2 100644 --- a/src/WebExtensions.Net/Generated/Cookies/GetDetails.cs +++ b/src/WebExtensions.Net/Generated/Cookies/GetDetails.cs @@ -9,26 +9,31 @@ namespace WebExtensions.Net.Cookies public partial class GetDetails : BaseObject { /// The first-party domain which the cookie to retrieve is associated. This attribute is required if First-Party Isolation is enabled. + [JsAccessPath("firstPartyDomain")] [JsonPropertyName("firstPartyDomain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FirstPartyDomain { get; set; } /// The name of the cookie to retrieve. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The storage partition, if the cookie is part of partitioned storage. By default, only non-partitioned cookies are returned. + [JsAccessPath("partitionKey")] [JsonPropertyName("partitionKey")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public PartitionKey PartitionKey { get; set; } /// The ID of the cookie store in which to look for the cookie. By default, the current execution context's cookie store will be used. + [JsAccessPath("storeId")] [JsonPropertyName("storeId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StoreId { get; set; } /// The URL with which the cookie to retrieve is associated. This argument may be a full URL, in which case any data following the URL path (e.g. the query string) is simply ignored. If host permissions for this URL are not specified in the manifest file, the API call will fail. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/ICookiesApi.cs b/src/WebExtensions.Net/Generated/Cookies/ICookiesApi.cs index 90425bf..e91a53c 100644 --- a/src/WebExtensions.Net/Generated/Cookies/ICookiesApi.cs +++ b/src/WebExtensions.Net/Generated/Cookies/ICookiesApi.cs @@ -1,36 +1,44 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.Cookies { /// Use the browser.cookies API to query and modify cookies, and to be notified when they change. + [JsAccessPath("cookies")] public partial interface ICookiesApi { /// Fired when a cookie is set or removed. As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with "cause" of "overwrite" . Afterwards, a new cookie is written with the updated values, generating a second notification with "cause" "explicit". + [JsAccessPath("onChanged")] OnChangedEvent OnChanged { get; } /// Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned. /// Details to identify the cookie being retrieved. /// Contains details about the cookie. This parameter is null if no such cookie was found. + [JsAccessPath("get")] ValueTask Get(GetDetails details); /// Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first. /// Information to filter the cookies being retrieved. /// All the existing, unexpired cookies that match the given cookie info. + [JsAccessPath("getAll")] ValueTask> GetAll(GetAllDetails details); /// Lists all existing cookie stores. /// All the existing cookie stores. + [JsAccessPath("getAllCookieStores")] ValueTask> GetAllCookieStores(); /// Deletes a cookie by name. /// Information to identify the cookie to remove. /// Contains details about the cookie that's been removed. If removal failed for any reason, this will be "null", and $(ref:runtime.lastError) will be set. + [JsAccessPath("remove")] ValueTask Remove(RemoveDetails details); /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. /// Details about the cookie being set. /// Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and $(ref:runtime.lastError) will be set. + [JsAccessPath("set")] ValueTask Set(SetDetails details); } } diff --git a/src/WebExtensions.Net/Generated/Cookies/OnChangedEvent.cs b/src/WebExtensions.Net/Generated/Cookies/OnChangedEvent.cs index 3187b6d..daf2a3f 100644 --- a/src/WebExtensions.Net/Generated/Cookies/OnChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/Cookies/OnChangedEvent.cs @@ -12,6 +12,7 @@ public partial class OnChangedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a cookie is set or removed. As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with "cause" of "overwrite" . Afterwards, a new cookie is written with the updated values, generating a second notification with "cause" "explicit". + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Cookies/PartitionKey.cs b/src/WebExtensions.Net/Generated/Cookies/PartitionKey.cs index 3ba6276..c2ae51f 100644 --- a/src/WebExtensions.Net/Generated/Cookies/PartitionKey.cs +++ b/src/WebExtensions.Net/Generated/Cookies/PartitionKey.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.Cookies public partial class PartitionKey : BaseObject { /// The first-party URL of the cookie, if the cookie is in storage partitioned by the top-level site. + [JsAccessPath("topLevelSite")] [JsonPropertyName("topLevelSite")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string TopLevelSite { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/RemoveDetails.cs b/src/WebExtensions.Net/Generated/Cookies/RemoveDetails.cs index bcc4c2e..06375e9 100644 --- a/src/WebExtensions.Net/Generated/Cookies/RemoveDetails.cs +++ b/src/WebExtensions.Net/Generated/Cookies/RemoveDetails.cs @@ -9,26 +9,31 @@ namespace WebExtensions.Net.Cookies public partial class RemoveDetails : BaseObject { /// The first-party domain associated with the cookie. This attribute is required if First-Party Isolation is enabled. + [JsAccessPath("firstPartyDomain")] [JsonPropertyName("firstPartyDomain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FirstPartyDomain { get; set; } /// The name of the cookie to remove. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The storage partition, if the cookie is part of partitioned storage. By default, non-partitioned storage is used. + [JsAccessPath("partitionKey")] [JsonPropertyName("partitionKey")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public PartitionKey PartitionKey { get; set; } /// The ID of the cookie store to look in for the cookie. If unspecified, the cookie is looked for by default in the current execution context's cookie store. + [JsAccessPath("storeId")] [JsonPropertyName("storeId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StoreId { get; set; } /// The URL associated with the cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Cookies/SetDetails.cs b/src/WebExtensions.Net/Generated/Cookies/SetDetails.cs index eae3991..837794c 100644 --- a/src/WebExtensions.Net/Generated/Cookies/SetDetails.cs +++ b/src/WebExtensions.Net/Generated/Cookies/SetDetails.cs @@ -9,61 +9,73 @@ namespace WebExtensions.Net.Cookies public partial class SetDetails : BaseObject { /// The domain of the cookie. If omitted, the cookie becomes a host-only cookie. + [JsAccessPath("domain")] [JsonPropertyName("domain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Domain { get; set; } /// The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie. + [JsAccessPath("expirationDate")] [JsonPropertyName("expirationDate")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? ExpirationDate { get; set; } /// The first-party domain of the cookie. This attribute is required if First-Party Isolation is enabled. + [JsAccessPath("firstPartyDomain")] [JsonPropertyName("firstPartyDomain")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FirstPartyDomain { get; set; } /// Whether the cookie should be marked as HttpOnly. Defaults to false. + [JsAccessPath("httpOnly")] [JsonPropertyName("httpOnly")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? HttpOnly { get; set; } /// The name of the cookie. Empty by default if omitted. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The storage partition, if the cookie is part of partitioned storage. By default, non-partitioned storage is used. + [JsAccessPath("partitionKey")] [JsonPropertyName("partitionKey")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public PartitionKey PartitionKey { get; set; } /// The path of the cookie. Defaults to the path portion of the url parameter. + [JsAccessPath("path")] [JsonPropertyName("path")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Path { get; set; } /// The cookie's same-site status. + [JsAccessPath("sameSite")] [JsonPropertyName("sameSite")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public SameSiteStatus? SameSite { get; set; } /// Whether the cookie should be marked as Secure. Defaults to false. + [JsAccessPath("secure")] [JsonPropertyName("secure")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Secure { get; set; } /// The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store. + [JsAccessPath("storeId")] [JsonPropertyName("storeId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StoreId { get; set; } /// The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } /// The value of the cookie. Empty by default if omitted. + [JsAccessPath("value")] [JsonPropertyName("value")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Value { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Action.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Action.cs index 1ac4de6..797cad3 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Action.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Action.cs @@ -10,21 +10,25 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class Action : BaseObject { /// Describes how the redirect should be performed. Only valid when type is 'redirect'. + [JsAccessPath("redirect")] [JsonPropertyName("redirect")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Redirect Redirect { get; set; } /// The request headers to modify for the request. Only valid when type is 'modifyHeaders'. + [JsAccessPath("requestHeaders")] [JsonPropertyName("requestHeaders")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable RequestHeaders { get; set; } /// The response headers to modify for the request. Only valid when type is 'modifyHeaders'. + [JsAccessPath("responseHeaders")] [JsonPropertyName("responseHeaders")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ResponseHeaders { get; set; } /// + [JsAccessPath("type")] [JsonPropertyName("type")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Type { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/AddOrReplaceParam.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/AddOrReplaceParam.cs index 5d861ab..0a40d94 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/AddOrReplaceParam.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/AddOrReplaceParam.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class AddOrReplaceParam : BaseObject { /// + [JsAccessPath("key")] [JsonPropertyName("key")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Key { get; set; } /// If true, the query key is replaced only if it's already present. Otherwise, the key is also added if it's missing. + [JsAccessPath("replaceOnly")] [JsonPropertyName("replaceOnly")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ReplaceOnly { get; set; } /// + [JsAccessPath("value")] [JsonPropertyName("value")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Value { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Condition.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Condition.cs index 8573d78..c789f36 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Condition.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Condition.cs @@ -10,71 +10,85 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class Condition : BaseObject { /// Specifies whether the network request is first-party or third-party to the domain from which it originated. If omitted, all requests are matched. + [JsAccessPath("domainType")] [JsonPropertyName("domainType")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string DomainType { get; set; } /// The rule will not match network requests originating from the list of 'initiatorDomains'. If the list is empty or omitted, no domains are excluded. This takes precedence over 'initiatorDomains'. + [JsAccessPath("excludedInitiatorDomains")] [JsonPropertyName("excludedInitiatorDomains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ExcludedInitiatorDomains { get; set; } /// The rule will not match network requests when the domains matches one from the list of 'excludedRequestDomains'. If the list is empty or omitted, no domains are excluded. This takes precedence over 'requestDomains'. + [JsAccessPath("excludedRequestDomains")] [JsonPropertyName("excludedRequestDomains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ExcludedRequestDomains { get; set; } /// List of request methods which the rule won't match. Cannot be specified if 'requestMethods' is specified. If neither of them is specified, all request methods are matched. + [JsAccessPath("excludedRequestMethods")] [JsonPropertyName("excludedRequestMethods")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ExcludedRequestMethods { get; set; } /// List of resource types which the rule won't match. Cannot be specified if 'resourceTypes' is specified. If neither of them is specified, all resource types except 'main_frame' are matched. + [JsAccessPath("excludedResourceTypes")] [JsonPropertyName("excludedResourceTypes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ExcludedResourceTypes { get; set; } /// List of tabIds which the rule should not match. An ID of -1 excludes requests which don't originate from a tab. Only supported for session-scoped rules. + [JsAccessPath("excludedTabIds")] [JsonPropertyName("excludedTabIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ExcludedTabIds { get; set; } /// The rule will only match network requests originating from the list of 'initiatorDomains'. If the list is omitted, the rule is applied to requests from all domains. + [JsAccessPath("initiatorDomains")] [JsonPropertyName("initiatorDomains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable InitiatorDomains { get; set; } /// Whether 'urlFilter' or 'regexFilter' is case-sensitive. + [JsAccessPath("isUrlFilterCaseSensitive")] [JsonPropertyName("isUrlFilterCaseSensitive")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IsUrlFilterCaseSensitive { get; set; } /// Regular expression to match against the network request url. Only one of 'urlFilter' or 'regexFilter' can be specified. + [JsAccessPath("regexFilter")] [JsonPropertyName("regexFilter")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string RegexFilter { get; set; } /// The rule will only match network requests when the domain matches one from the list of 'requestDomains'. If the list is omitted, the rule is applied to requests from all domains. + [JsAccessPath("requestDomains")] [JsonPropertyName("requestDomains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable RequestDomains { get; set; } /// List of HTTP request methods which the rule can match. Should be a lower-case method such as 'connect', 'delete', 'get', 'head', 'options', 'patch', 'post', 'put'.' + [JsAccessPath("requestMethods")] [JsonPropertyName("requestMethods")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable RequestMethods { get; set; } /// List of resource types which the rule can match. When the rule action is 'allowAllRequests', this must be specified and may only contain 'main_frame' or 'sub_frame'. Cannot be specified if 'excludedResourceTypes' is specified. If neither of them is specified, all resource types except 'main_frame' are matched. + [JsAccessPath("resourceTypes")] [JsonPropertyName("resourceTypes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ResourceTypes { get; set; } /// List of tabIds which the rule should match. An ID of -1 matches requests which don't originate from a tab. Only supported for session-scoped rules. + [JsAccessPath("tabIds")] [JsonPropertyName("tabIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable TabIds { get; set; } /// TODO: link to doc explaining supported pattern. The pattern which is matched against the network request url. Only one of 'urlFilter' or 'regexFilter' can be specified. + [JsAccessPath("urlFilter")] [JsonPropertyName("urlFilter")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UrlFilter { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs index c4dbad3..2bb785f 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs @@ -1,69 +1,87 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.DeclarativeNetRequest { /// Use the declarativeNetRequest API to block or modify network requests by specifying declarative rules. + [JsAccessPath("declarativeNetRequest")] public partial interface IDeclarativeNetRequestApi { /// Ruleset ID for the dynamic rules added by the extension. + [JsAccessPath("DYNAMIC_RULESET_ID")] string DYNAMIC_RULESET_ID { get; } /// The minimum number of static rules guaranteed to an extension across its enabled static rulesets. Any rules above this limit will count towards the global static rule limit. + [JsAccessPath("GUARANTEED_MINIMUM_STATIC_RULES")] double GUARANTEED_MINIMUM_STATIC_RULES { get; } /// The maximum number of dynamic and session rules an extension can add. NOTE: in the Firefox we are enforcing this limit to the session and dynamic rules count separately, instead of enforcing it to the rules count for both combined as the Chrome implementation does. + [JsAccessPath("MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES")] double MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES { get; } /// The maximum number of static Rulesets an extension can enable at any one time. + [JsAccessPath("MAX_NUMBER_OF_ENABLED_STATIC_RULESETS")] double MAX_NUMBER_OF_ENABLED_STATIC_RULESETS { get; } /// The maximum number of regular expression rules that an extension can add. This limit is evaluated separately for the set of session rules, dynamic rules and those specified in the rule_resources file. + [JsAccessPath("MAX_NUMBER_OF_REGEX_RULES")] double MAX_NUMBER_OF_REGEX_RULES { get; } /// The maximum number of static Rulesets an extension can specify as part of the rule_resources manifest key. + [JsAccessPath("MAX_NUMBER_OF_STATIC_RULESETS")] double MAX_NUMBER_OF_STATIC_RULESETS { get; } /// Ruleset ID for the session-scoped rules added by the extension. + [JsAccessPath("SESSION_RULESET_ID")] string SESSION_RULESET_ID { get; } /// Returns the remaining number of static rules an extension can enable /// + [JsAccessPath("getAvailableStaticRuleCount")] ValueTask GetAvailableStaticRuleCount(); /// Returns the current set of dynamic rules for the extension. /// + [JsAccessPath("getDynamicRules")] ValueTask> GetDynamicRules(); /// Returns the ids for the current set of enabled static rulesets. /// + [JsAccessPath("getEnabledRulesets")] ValueTask> GetEnabledRulesets(); /// Returns the current set of session scoped rules for the extension. /// + [JsAccessPath("getSessionRules")] ValueTask> GetSessionRules(); /// Checks if the given regular expression will be supported as a 'regexFilter' rule condition. /// /// + [JsAccessPath("isRegexSupported")] ValueTask IsRegexSupported(RegexOptions regexOptions); /// Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. /// The details of the request to test. /// /// + [JsAccessPath("testMatchOutcome")] ValueTask TestMatchOutcome(Request request, TestMatchOutcomeOptions options = null); /// Modifies the current set of dynamic rules for the extension. The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added. These rules are persisted across browser sessions and extension updates. /// + [JsAccessPath("updateDynamicRules")] ValueTask UpdateDynamicRules(UpdateDynamicRulesOptions options); /// Returns the ids for the current set of enabled static rulesets. /// + [JsAccessPath("updateEnabledRulesets")] ValueTask UpdateEnabledRulesets(UpdateRulesetOptions updateRulesetOptions); /// Modifies the current set of session scoped rules for the extension. The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added. These rules are not persisted across sessions and are backed in memory. /// + [JsAccessPath("updateSessionRules")] ValueTask UpdateSessionRules(UpdateSessionRulesOptions options); } } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IsRegexSupportedCallbackResult.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IsRegexSupportedCallbackResult.cs index dbcfe64..f12eea9 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IsRegexSupportedCallbackResult.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IsRegexSupportedCallbackResult.cs @@ -9,10 +9,12 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class IsRegexSupportedCallbackResult : BaseObject { /// Whether the given regex is supported + [JsAccessPath("isSupported")] [JsonPropertyName("isSupported")] public bool IsSupported { get; set; } /// Specifies the reason why the regular expression is not supported. Only provided if 'isSupported' is false. + [JsAccessPath("reason")] [JsonPropertyName("reason")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public UnsupportedRegexReason? Reason { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/MatchedRule.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/MatchedRule.cs index 252d722..e2cc0c5 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/MatchedRule.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/MatchedRule.cs @@ -9,15 +9,18 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class MatchedRule : BaseObject { /// ID of the extension, if this rule belongs to a different extension. + [JsAccessPath("extensionId")] [JsonPropertyName("extensionId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ExtensionId { get; set; } /// A matching rule's ID. + [JsAccessPath("ruleId")] [JsonPropertyName("ruleId")] public int RuleId { get; set; } /// ID of the Ruleset this rule belongs to. + [JsAccessPath("rulesetId")] [JsonPropertyName("rulesetId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string RulesetId { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/QueryTransform.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/QueryTransform.cs index e816794..d333af8 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/QueryTransform.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/QueryTransform.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class QueryTransform : BaseObject { /// The list of query key-value pairs to be added or replaced. + [JsAccessPath("addOrReplaceParams")] [JsonPropertyName("addOrReplaceParams")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable AddOrReplaceParams { get; set; } /// The list of query keys to be removed. + [JsAccessPath("removeParams")] [JsonPropertyName("removeParams")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable RemoveParams { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Redirect.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Redirect.cs index 3434f68..117be29 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Redirect.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Redirect.cs @@ -9,21 +9,25 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class Redirect : BaseObject { /// Path relative to the extension directory. Should start with '/'. + [JsAccessPath("extensionPath")] [JsonPropertyName("extensionPath")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ExtensionPath { get; set; } /// Substitution pattern for rules which specify a 'regexFilter'. The first match of regexFilter within the url will be replaced with this pattern. Within regexSubstitution, backslash-escaped digits (\1 to \9) can be used to insert the corresponding capture groups. \0 refers to the entire matching text. + [JsAccessPath("regexSubstitution")] [JsonPropertyName("regexSubstitution")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string RegexSubstitution { get; set; } /// Url transformations to perform. + [JsAccessPath("transform")] [JsonPropertyName("transform")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public UrlTransform Transform { get; set; } /// The redirect url. Redirects to JavaScript urls are not allowed. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RegexOptions.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RegexOptions.cs index 89a2548..9d548bb 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RegexOptions.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RegexOptions.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class RegexOptions : BaseObject { /// Whether the 'regex' specified is case sensitive. + [JsAccessPath("isCaseSensitive")] [JsonPropertyName("isCaseSensitive")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IsCaseSensitive { get; set; } /// The regular expresson to check. + [JsAccessPath("regex")] [JsonPropertyName("regex")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Regex { get; set; } /// Whether the 'regex' specified requires capturing. Capturing is only required for redirect rules which specify a 'regexSubstition' action. + [JsAccessPath("requireCapturing")] [JsonPropertyName("requireCapturing")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? RequireCapturing { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Request.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Request.cs index c02e25a..e0ebbfd 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Request.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Request.cs @@ -9,25 +9,30 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class Request : BaseObject { /// The initiator URL (if any) for the hypothetical request. + [JsAccessPath("initiator")] [JsonPropertyName("initiator")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Initiator { get; set; } /// Standard HTTP method of the hypothetical request. + [JsAccessPath("method")] [JsonPropertyName("method")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Method { get; set; } /// The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TabId { get; set; } /// The resource type of the hypothetical request. + [JsAccessPath("type")] [JsonPropertyName("type")] public ResourceType Type { get; set; } /// The URL of the hypothetical request. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RequestHeader.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RequestHeader.cs index d36ce05..9468f03 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RequestHeader.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/RequestHeader.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class RequestHeader : BaseObject { /// The name of the request header to be modified. + [JsAccessPath("header")] [JsonPropertyName("header")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Header { get; set; } /// The operation to be performed on a header. + [JsAccessPath("operation")] [JsonPropertyName("operation")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Operation { get; set; } /// The new value for the header. Must be specified for the 'append' and 'set' operations. + [JsAccessPath("value")] [JsonPropertyName("value")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Value { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/ResponseHeader.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/ResponseHeader.cs index ba6f806..9e86f4e 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/ResponseHeader.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/ResponseHeader.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class ResponseHeader : BaseObject { /// The name of the response header to be modified. + [JsAccessPath("header")] [JsonPropertyName("header")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Header { get; set; } /// The operation to be performed on a header. + [JsAccessPath("operation")] [JsonPropertyName("operation")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Operation { get; set; } /// The new value for the header. Must be specified for the 'append' and 'set' operations. + [JsAccessPath("value")] [JsonPropertyName("value")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Value { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Rule.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Rule.cs index 9578c26..41ca995 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Rule.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/Rule.cs @@ -9,20 +9,24 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class Rule : BaseObject { /// The action to take if this rule is matched. + [JsAccessPath("action")] [JsonPropertyName("action")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Action Action { get; set; } /// The condition under which this rule is triggered. + [JsAccessPath("condition")] [JsonPropertyName("condition")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Condition Condition { get; set; } /// An id which uniquely identifies a rule. Mandatory and should be >= 1. + [JsAccessPath("id")] [JsonPropertyName("id")] public int Id { get; set; } /// Rule priority. Defaults to 1. When specified, should be >= 1 + [JsAccessPath("priority")] [JsonPropertyName("priority")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Priority { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeCallbackResult.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeCallbackResult.cs index 75b9d67..46867e7 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeCallbackResult.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeCallbackResult.cs @@ -10,6 +10,7 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class TestMatchOutcomeCallbackResult : BaseObject { /// The rules (if any) that match the hypothetical request. + [JsAccessPath("matchedRules")] [JsonPropertyName("matchedRules")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable MatchedRules { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeOptions.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeOptions.cs index 1ee7f98..3bf6ac5 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeOptions.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/TestMatchOutcomeOptions.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class TestMatchOutcomeOptions : BaseObject { /// Whether to account for rules from other installed extensions during rule evaluation. + [JsAccessPath("includeOtherExtensions")] [JsonPropertyName("includeOtherExtensions")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IncludeOtherExtensions { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateDynamicRulesOptions.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateDynamicRulesOptions.cs index 46660fc..173be7d 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateDynamicRulesOptions.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateDynamicRulesOptions.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class UpdateDynamicRulesOptions : BaseObject { /// Rules to add. + [JsAccessPath("addRules")] [JsonPropertyName("addRules")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable AddRules { get; set; } /// IDs of the rules to remove. Any invalid IDs will be ignored. + [JsAccessPath("removeRuleIds")] [JsonPropertyName("removeRuleIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable RemoveRuleIds { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateRulesetOptions.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateRulesetOptions.cs index 1264627..e9f1034 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateRulesetOptions.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateRulesetOptions.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class UpdateRulesetOptions : BaseObject { /// + [JsAccessPath("disableRulesetIds")] [JsonPropertyName("disableRulesetIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable DisableRulesetIds { get; set; } /// + [JsAccessPath("enableRulesetIds")] [JsonPropertyName("enableRulesetIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable EnableRulesetIds { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateSessionRulesOptions.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateSessionRulesOptions.cs index 62a7399..390bc2b 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateSessionRulesOptions.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UpdateSessionRulesOptions.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class UpdateSessionRulesOptions : BaseObject { /// Rules to add. + [JsAccessPath("addRules")] [JsonPropertyName("addRules")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable AddRules { get; set; } /// IDs of the rules to remove. Any invalid IDs will be ignored. + [JsAccessPath("removeRuleIds")] [JsonPropertyName("removeRuleIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable RemoveRuleIds { get; set; } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UrlTransform.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UrlTransform.cs index ca9706c..850682c 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UrlTransform.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/UrlTransform.cs @@ -9,46 +9,55 @@ namespace WebExtensions.Net.DeclarativeNetRequest public partial class UrlTransform : BaseObject { /// The new fragment for the request. Should be either empty, in which case the existing fragment is cleared; or should begin with '#'. + [JsAccessPath("fragment")] [JsonPropertyName("fragment")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Fragment { get; set; } /// The new host name for the request. + [JsAccessPath("host")] [JsonPropertyName("host")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Host { get; set; } /// The new password for the request. + [JsAccessPath("password")] [JsonPropertyName("password")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Password { get; set; } /// The new path for the request. If empty, the existing path is cleared. + [JsAccessPath("path")] [JsonPropertyName("path")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Path { get; set; } /// The new port for the request. If empty, the existing port is cleared. + [JsAccessPath("port")] [JsonPropertyName("port")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Port { get; set; } /// The new query for the request. Should be either empty, in which case the existing query is cleared; or should begin with '?'. Cannot be specified if 'queryTransform' is specified. + [JsAccessPath("query")] [JsonPropertyName("query")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Query { get; set; } /// Add, remove or replace query key-value pairs. Cannot be specified if 'query' is specified. + [JsAccessPath("queryTransform")] [JsonPropertyName("queryTransform")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public QueryTransform QueryTransform { get; set; } /// The new scheme for the request. + [JsAccessPath("scheme")] [JsonPropertyName("scheme")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Scheme { get; set; } /// The new username for the request. + [JsAccessPath("username")] [JsonPropertyName("username")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Username { get; set; } diff --git a/src/WebExtensions.Net/Generated/Devtools/IDevtoolsApi.cs b/src/WebExtensions.Net/Generated/Devtools/IDevtoolsApi.cs index 762905e..310973d 100644 --- a/src/WebExtensions.Net/Generated/Devtools/IDevtoolsApi.cs +++ b/src/WebExtensions.Net/Generated/Devtools/IDevtoolsApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using WebExtensions.Net.Devtools.InspectedWindow; using WebExtensions.Net.Devtools.Network; using WebExtensions.Net.Devtools.Panels; @@ -5,15 +6,19 @@ namespace WebExtensions.Net.Devtools { /// + [JsAccessPath("devtools")] public partial interface IDevtoolsApi { /// Use the chrome.devtools.inspectedWindow API to interact with the inspected window: obtain the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page. + [JsAccessPath("inspectedWindow")] IInspectedWindowApi InspectedWindow { get; } /// Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel. + [JsAccessPath("network")] INetworkApi Network { get; } /// Use the chrome.devtools.panels API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars. + [JsAccessPath("panels")] IPanelsApi Panels { get; } } } diff --git a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/EvalResult.cs b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/EvalResult.cs index 0aad6cc..d4fb410 100644 --- a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/EvalResult.cs +++ b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/EvalResult.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using System; using System.Text.Json; using System.Text.Json.Serialization; @@ -18,11 +19,13 @@ public EvalResult() : base(propertyTypes, propertyNames) } /// The result of evaluation. + [JsAccessPath("result")] [JsonPropertyName("result")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public JsonElement Result { get; set; } /// An object providing details if an exception occurred while evaluating the expression. + [JsAccessPath("exceptionInfo")] [JsonPropertyName("exceptionInfo")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ExceptionInfo ExceptionInfo { get; set; } diff --git a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ExceptionInfo.cs b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ExceptionInfo.cs index 22c7a5a..b594b46 100644 --- a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ExceptionInfo.cs +++ b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ExceptionInfo.cs @@ -10,29 +10,35 @@ namespace WebExtensions.Net.Devtools.InspectedWindow public partial class ExceptionInfo : BaseObject { /// Set if the error occurred on the DevTools side before the expression is evaluated. + [JsAccessPath("code")] [JsonPropertyName("code")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Code { get; set; } /// Set if the error occurred on the DevTools side before the expression is evaluated. + [JsAccessPath("description")] [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Description { get; set; } /// Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error. + [JsAccessPath("details")] [JsonPropertyName("details")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Details { get; set; } /// Set if the error occurred on the DevTools side before the expression is evaluated. + [JsAccessPath("isError")] [JsonPropertyName("isError")] public bool IsError { get; set; } /// Set if the evaluated code produces an unhandled exception. + [JsAccessPath("isException")] [JsonPropertyName("isException")] public bool IsException { get; set; } /// Set if the evaluated code produces an unhandled exception. + [JsAccessPath("value")] [JsonPropertyName("value")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Value { get; set; } diff --git a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs index 55cf376..19dbeb1 100644 --- a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs +++ b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs @@ -1,21 +1,26 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.Devtools.InspectedWindow { /// Use the chrome.devtools.inspectedWindow API to interact with the inspected window: obtain the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page. + [JsAccessPath("inspectedWindow")] public partial interface IInspectedWindowApi { /// The ID of the tab being inspected. This ID may be used with chrome.tabs.* API. + [JsAccessPath("tabId")] int TabId { get; } /// Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object. /// An expression to evaluate. /// The options parameter can contain one or more options. /// + [JsAccessPath("eval")] ValueTask Eval(string expression, object options = null); /// Reloads the inspected page. /// + [JsAccessPath("reload")] ValueTask Reload(ReloadOptions reloadOptions = null); } } diff --git a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ReloadOptions.cs b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ReloadOptions.cs index 0012967..5f81039 100644 --- a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ReloadOptions.cs +++ b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/ReloadOptions.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Devtools.InspectedWindow public partial class ReloadOptions : BaseObject { /// When true, the loader will bypass the cache for all inspected page resources loaded before the load event is fired. The effect is similar to pressing Ctrl+Shift+R in the inspected window or within the Developer Tools window. + [JsAccessPath("ignoreCache")] [JsonPropertyName("ignoreCache")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IgnoreCache { get; set; } /// If specified, the script will be injected into every frame of the inspected page immediately upon load, before any of the frame's scripts. The script will not be injected after subsequent reloads-for example, if the user presses Ctrl+R. + [JsAccessPath("injectedScript")] [JsonPropertyName("injectedScript")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string InjectedScript { get; set; } /// If specified, the string will override the value of the User-Agent HTTP header that's sent while loading the resources of the inspected page. The string will also override the value of the navigator.userAgent property that's returned to any scripts that are running within the inspected page. + [JsAccessPath("userAgent")] [JsonPropertyName("userAgent")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UserAgent { get; set; } diff --git a/src/WebExtensions.Net/Generated/Devtools/Network/INetworkApi.cs b/src/WebExtensions.Net/Generated/Devtools/Network/INetworkApi.cs index 222be6b..9425eb8 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Network/INetworkApi.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Network/INetworkApi.cs @@ -1,19 +1,24 @@ +using JsBind.Net; using System.Text.Json; using System.Threading.Tasks; namespace WebExtensions.Net.Devtools.Network { /// Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel. + [JsAccessPath("network")] public partial interface INetworkApi { /// Fired when the inspected window navigates to a new page. + [JsAccessPath("onNavigated")] OnNavigatedEvent OnNavigated { get; } /// Fired when a network request is finished and all request data are available. + [JsAccessPath("onRequestFinished")] OnRequestFinishedEvent OnRequestFinished { get; } /// Returns HAR log that contains all known network requests. /// A HAR log. See HAR specification for details. + [JsAccessPath("getHAR")] ValueTask GetHAR(); } } diff --git a/src/WebExtensions.Net/Generated/Devtools/Network/OnNavigatedEvent.cs b/src/WebExtensions.Net/Generated/Devtools/Network/OnNavigatedEvent.cs index b278465..17104ef 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Network/OnNavigatedEvent.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Network/OnNavigatedEvent.cs @@ -12,6 +12,7 @@ public partial class OnNavigatedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the inspected window navigates to a new page. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Devtools/Network/OnRequestFinishedEvent.cs b/src/WebExtensions.Net/Generated/Devtools/Network/OnRequestFinishedEvent.cs index b7040a6..369f630 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Network/OnRequestFinishedEvent.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Network/OnRequestFinishedEvent.cs @@ -12,6 +12,7 @@ public partial class OnRequestFinishedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a network request is finished and all request data are available. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Devtools/Network/Request.cs b/src/WebExtensions.Net/Generated/Devtools/Network/Request.cs index 4392a8d..23a85d3 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Network/Request.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Network/Request.cs @@ -11,6 +11,7 @@ public partial class Request : BaseObject { /// Returns content of the response body. /// A function that receives the response body when the request completes. + [JsAccessPath("getContent")] public virtual ValueTask GetContent(Action callback) { return InvokeVoidAsync("getContent", callback); diff --git a/src/WebExtensions.Net/Generated/Devtools/Panels/ElementsPanel.cs b/src/WebExtensions.Net/Generated/Devtools/Panels/ElementsPanel.cs index 68954b1..23683ac 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Panels/ElementsPanel.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Panels/ElementsPanel.cs @@ -11,6 +11,7 @@ public partial class ElementsPanel : BaseObject /// Creates a pane within panel's sidebar. /// Text that is displayed in sidebar caption. /// An ExtensionSidebarPane object for created sidebar pane. + [JsAccessPath("createSidebarPane")] public virtual ValueTask CreateSidebarPane(string title) { return InvokeAsync("createSidebarPane", title); diff --git a/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs b/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs index 8dbaf60..fc685f7 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs @@ -12,6 +12,7 @@ public partial class ExtensionSidebarPane : BaseObject /// Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane. /// An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch. /// An optional title for the root of the expression tree. + [JsAccessPath("setExpression")] public virtual ValueTask SetExpression(string expression, string rootTitle = null) { return InvokeVoidAsync("setExpression", expression, rootTitle); @@ -20,6 +21,7 @@ public virtual ValueTask SetExpression(string expression, string rootTitle = nul /// Sets a JSON-compliant object to be displayed in the sidebar pane. /// An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client). /// An optional title for the root of the expression tree. + [JsAccessPath("setObject")] public virtual ValueTask SetObject(string jsonObject, string rootTitle = null) { return InvokeVoidAsync("setObject", jsonObject, rootTitle); @@ -27,6 +29,7 @@ public virtual ValueTask SetObject(string jsonObject, string rootTitle = null) /// Sets an HTML page to be displayed in the sidebar pane. /// Relative path of an extension page to display within the sidebar. + [JsAccessPath("setPage")] public virtual ValueTask SetPage(ExtensionUrl path) { return InvokeVoidAsync("setPage", path); diff --git a/src/WebExtensions.Net/Generated/Devtools/Panels/IPanelsApi.cs b/src/WebExtensions.Net/Generated/Devtools/Panels/IPanelsApi.cs index 2b937cb..5ccb779 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Panels/IPanelsApi.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Panels/IPanelsApi.cs @@ -1,21 +1,27 @@ +using JsBind.Net; using System.Threading.Tasks; using WebExtensions.Net.Manifest; namespace WebExtensions.Net.Devtools.Panels { /// Use the chrome.devtools.panels API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars. + [JsAccessPath("panels")] public partial interface IPanelsApi { /// Elements panel. + [JsAccessPath("elements")] ElementsPanel Elements { get; } /// Fired when the devtools theme changes. + [JsAccessPath("onThemeChanged")] OnThemeChangedEvent OnThemeChanged { get; } /// Sources panel. + [JsAccessPath("sources")] SourcesPanel Sources { get; } /// The name of the current devtools theme. + [JsAccessPath("themeName")] string ThemeName { get; } /// Creates an extension panel. @@ -23,6 +29,7 @@ public partial interface IPanelsApi /// Path of the panel's icon relative to the extension directory, or an empty string to use the default extension icon as the panel icon. /// Path of the panel's HTML page relative to the extension directory. /// An ExtensionPanel object representing the created panel. + [JsAccessPath("create")] ValueTask Create(string title, string iconPath, ExtensionUrl pagePath); /// Creates an extension panel. @@ -30,6 +37,7 @@ public partial interface IPanelsApi /// Path of the panel's icon relative to the extension directory, or an empty string to use the default extension icon as the panel icon. /// Path of the panel's HTML page relative to the extension directory. /// An ExtensionPanel object representing the created panel. + [JsAccessPath("create")] ValueTask Create(string title, ExtensionUrl iconPath, ExtensionUrl pagePath); } } diff --git a/src/WebExtensions.Net/Generated/Devtools/Panels/OnThemeChangedEvent.cs b/src/WebExtensions.Net/Generated/Devtools/Panels/OnThemeChangedEvent.cs index 0e59f11..2c3048d 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Panels/OnThemeChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Panels/OnThemeChangedEvent.cs @@ -12,6 +12,7 @@ public partial class OnThemeChangedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the devtools theme changes. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Downloads/BooleanDelta.cs b/src/WebExtensions.Net/Generated/Downloads/BooleanDelta.cs index a8959ff..14be44e 100644 --- a/src/WebExtensions.Net/Generated/Downloads/BooleanDelta.cs +++ b/src/WebExtensions.Net/Generated/Downloads/BooleanDelta.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Downloads public partial class BooleanDelta : BaseObject { /// + [JsAccessPath("current")] [JsonPropertyName("current")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Current { get; set; } /// + [JsAccessPath("previous")] [JsonPropertyName("previous")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Previous { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/DoubleDelta.cs b/src/WebExtensions.Net/Generated/Downloads/DoubleDelta.cs index 00590d3..d89b380 100644 --- a/src/WebExtensions.Net/Generated/Downloads/DoubleDelta.cs +++ b/src/WebExtensions.Net/Generated/Downloads/DoubleDelta.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Downloads public partial class DoubleDelta : BaseObject { /// + [JsAccessPath("current")] [JsonPropertyName("current")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? Current { get; set; } /// + [JsAccessPath("previous")] [JsonPropertyName("previous")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? Previous { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/DownloadDelta.cs b/src/WebExtensions.Net/Generated/Downloads/DownloadDelta.cs index a793d01..23fcf98 100644 --- a/src/WebExtensions.Net/Generated/Downloads/DownloadDelta.cs +++ b/src/WebExtensions.Net/Generated/Downloads/DownloadDelta.cs @@ -9,70 +9,84 @@ namespace WebExtensions.Net.Downloads public partial class DownloadDelta : BaseObject { /// + [JsAccessPath("canResume")] [JsonPropertyName("canResume")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BooleanDelta CanResume { get; set; } /// Describes a change in a DownloadItem's danger. + [JsAccessPath("danger")] [JsonPropertyName("danger")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta Danger { get; set; } /// Describes a change in a DownloadItem's endTime. + [JsAccessPath("endTime")] [JsonPropertyName("endTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta EndTime { get; set; } /// Describes a change in a DownloadItem's error. + [JsAccessPath("error")] [JsonPropertyName("error")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta Error { get; set; } /// + [JsAccessPath("exists")] [JsonPropertyName("exists")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BooleanDelta Exists { get; set; } /// Describes a change in a DownloadItem's filename. + [JsAccessPath("filename")] [JsonPropertyName("filename")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta Filename { get; set; } /// Describes a change in a DownloadItem's fileSize. + [JsAccessPath("fileSize")] [JsonPropertyName("fileSize")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DoubleDelta FileSize { get; set; } /// The id of the DownloadItem that changed. + [JsAccessPath("id")] [JsonPropertyName("id")] public int Id { get; set; } /// Describes a change in a DownloadItem's mime. + [JsAccessPath("mime")] [JsonPropertyName("mime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta Mime { get; set; } /// Describes a change in a DownloadItem's paused. + [JsAccessPath("paused")] [JsonPropertyName("paused")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BooleanDelta Paused { get; set; } /// Describes a change in a DownloadItem's startTime. + [JsAccessPath("startTime")] [JsonPropertyName("startTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta StartTime { get; set; } /// Describes a change in a DownloadItem's state. + [JsAccessPath("state")] [JsonPropertyName("state")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta State { get; set; } /// Describes a change in a DownloadItem's totalBytes. + [JsAccessPath("totalBytes")] [JsonPropertyName("totalBytes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DoubleDelta TotalBytes { get; set; } /// Describes a change in a DownloadItem's url. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public StringDelta Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/DownloadItem.cs b/src/WebExtensions.Net/Generated/Downloads/DownloadItem.cs index 8d5c9f5..94042e2 100644 --- a/src/WebExtensions.Net/Generated/Downloads/DownloadItem.cs +++ b/src/WebExtensions.Net/Generated/Downloads/DownloadItem.cs @@ -9,96 +9,117 @@ namespace WebExtensions.Net.Downloads public partial class DownloadItem : BaseObject { /// + [JsAccessPath("byExtensionId")] [JsonPropertyName("byExtensionId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ByExtensionId { get; set; } /// + [JsAccessPath("byExtensionName")] [JsonPropertyName("byExtensionName")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ByExtensionName { get; set; } /// Number of bytes received so far from the host, without considering file compression. + [JsAccessPath("bytesReceived")] [JsonPropertyName("bytesReceived")] public double BytesReceived { get; set; } /// + [JsAccessPath("canResume")] [JsonPropertyName("canResume")] public bool CanResume { get; set; } /// The cookie store ID of the contextual identity. + [JsAccessPath("cookieStoreId")] [JsonPropertyName("cookieStoreId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string CookieStoreId { get; set; } /// Indication of whether this download is thought to be safe or known to be suspicious. + [JsAccessPath("danger")] [JsonPropertyName("danger")] public DangerType Danger { get; set; } /// Number of milliseconds between the unix epoch and when this download ended. + [JsAccessPath("endTime")] [JsonPropertyName("endTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string EndTime { get; set; } /// Number indicating why a download was interrupted. + [JsAccessPath("error")] [JsonPropertyName("error")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public InterruptReason? Error { get; set; } /// + [JsAccessPath("estimatedEndTime")] [JsonPropertyName("estimatedEndTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string EstimatedEndTime { get; set; } /// + [JsAccessPath("exists")] [JsonPropertyName("exists")] public bool Exists { get; set; } /// Absolute local path. + [JsAccessPath("filename")] [JsonPropertyName("filename")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Filename { get; set; } /// Number of bytes in the whole file post-decompression, or -1 if unknown. + [JsAccessPath("fileSize")] [JsonPropertyName("fileSize")] public double FileSize { get; set; } /// An identifier that is persistent across browser sessions. + [JsAccessPath("id")] [JsonPropertyName("id")] public int Id { get; set; } /// False if this download is recorded in the history, true if it is not recorded. + [JsAccessPath("incognito")] [JsonPropertyName("incognito")] public bool Incognito { get; set; } /// The file's MIME type. + [JsAccessPath("mime")] [JsonPropertyName("mime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Mime { get; set; } /// True if the download has stopped reading data from the host, but kept the connection open. + [JsAccessPath("paused")] [JsonPropertyName("paused")] public bool Paused { get; set; } /// + [JsAccessPath("referrer")] [JsonPropertyName("referrer")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Referrer { get; set; } /// Number of milliseconds between the unix epoch and when this download began. + [JsAccessPath("startTime")] [JsonPropertyName("startTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StartTime { get; set; } /// Indicates whether the download is progressing, interrupted, or complete. + [JsAccessPath("state")] [JsonPropertyName("state")] public State State { get; set; } /// Number of bytes in the whole file, without considering file compression, or -1 if unknown. + [JsAccessPath("totalBytes")] [JsonPropertyName("totalBytes")] public double TotalBytes { get; set; } /// Absolute URL. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/DownloadOptions.cs b/src/WebExtensions.Net/Generated/Downloads/DownloadOptions.cs index 4960741..16e8e5e 100644 --- a/src/WebExtensions.Net/Generated/Downloads/DownloadOptions.cs +++ b/src/WebExtensions.Net/Generated/Downloads/DownloadOptions.cs @@ -10,51 +10,61 @@ namespace WebExtensions.Net.Downloads public partial class DownloadOptions : BaseObject { /// When this flag is set to true, then the browser will allow downloads to proceed after encountering HTTP errors such as 404 Not Found. + [JsAccessPath("allowHttpErrors")] [JsonPropertyName("allowHttpErrors")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? AllowHttpErrors { get; set; } /// Post body. + [JsAccessPath("body")] [JsonPropertyName("body")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Body { get; set; } /// + [JsAccessPath("conflictAction")] [JsonPropertyName("conflictAction")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public FilenameConflictAction? ConflictAction { get; set; } /// The cookie store ID of the contextual identity; requires "cookies" permission. + [JsAccessPath("cookieStoreId")] [JsonPropertyName("cookieStoreId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string CookieStoreId { get; set; } /// A file path relative to the Downloads directory to contain the downloaded file. + [JsAccessPath("filename")] [JsonPropertyName("filename")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Filename { get; set; } /// Extra HTTP headers to send with the request if the URL uses the HTTP[s] protocol. Each header is represented as a dictionary containing the keys name and either value or binaryValue, restricted to those allowed by XMLHttpRequest. + [JsAccessPath("headers")] [JsonPropertyName("headers")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable
Headers { get; set; } /// Whether to associate the download with a private browsing session. + [JsAccessPath("incognito")] [JsonPropertyName("incognito")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Incognito { get; set; } /// The HTTP method to use if the URL uses the HTTP[S] protocol. + [JsAccessPath("method")] [JsonPropertyName("method")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Method { get; set; } /// Use a file-chooser to allow the user to select a filename. If the option is not specified, the file chooser will be shown only if the Firefox "Always ask you where to save files" option is enabled (i.e. the pref browser.download.useDownloadDir is set to false). + [JsAccessPath("saveAs")] [JsonPropertyName("saveAs")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? SaveAs { get; set; } /// The URL to download. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/DownloadQuery.cs b/src/WebExtensions.Net/Generated/Downloads/DownloadQuery.cs index 2b6d15d..d6bfea0 100644 --- a/src/WebExtensions.Net/Generated/Downloads/DownloadQuery.cs +++ b/src/WebExtensions.Net/Generated/Downloads/DownloadQuery.cs @@ -10,131 +10,157 @@ namespace WebExtensions.Net.Downloads public partial class DownloadQuery : BaseObject { /// Number of bytes received so far from the host, without considering file compression. + [JsAccessPath("bytesReceived")] [JsonPropertyName("bytesReceived")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? BytesReceived { get; set; } /// The cookie store ID of the contextual identity. + [JsAccessPath("cookieStoreId")] [JsonPropertyName("cookieStoreId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string CookieStoreId { get; set; } /// Indication of whether this download is thought to be safe or known to be suspicious. + [JsAccessPath("danger")] [JsonPropertyName("danger")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DangerType? Danger { get; set; } /// Limits results to downloads that ended after the given ms since the epoch. + [JsAccessPath("endedAfter")] [JsonPropertyName("endedAfter")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DownloadTime EndedAfter { get; set; } /// Limits results to downloads that ended before the given ms since the epoch. + [JsAccessPath("endedBefore")] [JsonPropertyName("endedBefore")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DownloadTime EndedBefore { get; set; } /// + [JsAccessPath("endTime")] [JsonPropertyName("endTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string EndTime { get; set; } /// Why a download was interrupted. + [JsAccessPath("error")] [JsonPropertyName("error")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public InterruptReason? Error { get; set; } /// + [JsAccessPath("exists")] [JsonPropertyName("exists")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Exists { get; set; } /// Absolute local path. + [JsAccessPath("filename")] [JsonPropertyName("filename")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Filename { get; set; } /// Limits results to DownloadItems whose filename matches the given regular expression. + [JsAccessPath("filenameRegex")] [JsonPropertyName("filenameRegex")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FilenameRegex { get; set; } /// Number of bytes in the whole file post-decompression, or -1 if unknown. + [JsAccessPath("fileSize")] [JsonPropertyName("fileSize")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? FileSize { get; set; } /// + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Id { get; set; } /// Setting this integer limits the number of results. Otherwise, all matching DownloadItems will be returned. + [JsAccessPath("limit")] [JsonPropertyName("limit")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Limit { get; set; } /// The file's MIME type. + [JsAccessPath("mime")] [JsonPropertyName("mime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Mime { get; set; } /// Setting elements of this array to DownloadItem properties in order to sort the search results. For example, setting orderBy='startTime' sorts the DownloadItems by their start time in ascending order. To specify descending order, prefix orderBy with a hyphen: '-startTime'. + [JsAccessPath("orderBy")] [JsonPropertyName("orderBy")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable OrderBy { get; set; } /// True if the download has stopped reading data from the host, but kept the connection open. + [JsAccessPath("paused")] [JsonPropertyName("paused")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Paused { get; set; } /// This array of search terms limits results to DownloadItems whose filename or url contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash. + [JsAccessPath("query")] [JsonPropertyName("query")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Query { get; set; } /// Limits results to downloads that started after the given ms since the epoch. + [JsAccessPath("startedAfter")] [JsonPropertyName("startedAfter")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DownloadTime StartedAfter { get; set; } /// Limits results to downloads that started before the given ms since the epoch. + [JsAccessPath("startedBefore")] [JsonPropertyName("startedBefore")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public DownloadTime StartedBefore { get; set; } /// + [JsAccessPath("startTime")] [JsonPropertyName("startTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string StartTime { get; set; } /// Indicates whether the download is progressing, interrupted, or complete. + [JsAccessPath("state")] [JsonPropertyName("state")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public State? State { get; set; } /// Number of bytes in the whole file, without considering file compression, or -1 if unknown. + [JsAccessPath("totalBytes")] [JsonPropertyName("totalBytes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? TotalBytes { get; set; } /// Limits results to downloads whose totalBytes is greater than the given integer. + [JsAccessPath("totalBytesGreater")] [JsonPropertyName("totalBytesGreater")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? TotalBytesGreater { get; set; } /// Limits results to downloads whose totalBytes is less than the given integer. + [JsAccessPath("totalBytesLess")] [JsonPropertyName("totalBytesLess")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? TotalBytesLess { get; set; } /// Absolute URL. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } /// Limits results to DownloadItems whose url matches the given regular expression. + [JsAccessPath("urlRegex")] [JsonPropertyName("urlRegex")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UrlRegex { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/GetFileIconOptions.cs b/src/WebExtensions.Net/Generated/Downloads/GetFileIconOptions.cs index 066f64f..bc9268c 100644 --- a/src/WebExtensions.Net/Generated/Downloads/GetFileIconOptions.cs +++ b/src/WebExtensions.Net/Generated/Downloads/GetFileIconOptions.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.Downloads public partial class GetFileIconOptions : BaseObject { /// The size of the icon. The returned icon will be square with dimensions size * size pixels. The default size for the icon is 32x32 pixels. + [JsAccessPath("size")] [JsonPropertyName("size")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Size { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/Header.cs b/src/WebExtensions.Net/Generated/Downloads/Header.cs index f027e0f..f7fd3c2 100644 --- a/src/WebExtensions.Net/Generated/Downloads/Header.cs +++ b/src/WebExtensions.Net/Generated/Downloads/Header.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Downloads public partial class Header : BaseObject { /// Name of the HTTP header. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// Value of the HTTP header. + [JsAccessPath("value")] [JsonPropertyName("value")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Value { get; set; } diff --git a/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs b/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs index 1eeb4a0..5efd6bb 100644 --- a/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs +++ b/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs @@ -1,67 +1,83 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.Downloads { /// + [JsAccessPath("downloads")] public partial interface IDownloadsApi { /// When any of a DownloadItem's properties except bytesReceived changes, this event fires with the downloadId and an object containing the properties that changed. + [JsAccessPath("onChanged")] OnChangedEvent OnChanged { get; } /// This event fires with the DownloadItem object when a download begins. + [JsAccessPath("onCreated")] OnCreatedEvent OnCreated { get; } /// Fires with the downloadId when a download is erased from history. + [JsAccessPath("onErased")] OnErasedEvent OnErased { get; } /// Cancel a download. When callback is run, the download is cancelled, completed, interrupted or doesn't exist anymore. /// The id of the download to cancel. + [JsAccessPath("cancel")] ValueTask Cancel(int downloadId); /// Download a URL. If the URL uses the HTTP[S] protocol, then the request will include all cookies currently set for its hostname. If both filename and saveAs are specified, then the Save As dialog will be displayed, pre-populated with the specified filename. If the download started successfully, callback will be called with the new DownloadItem's downloadId. If there was an error starting the download, then callback will be called with downloadId=undefined and chrome.extension.lastError will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. You must not parse it. /// What to download and how. /// + [JsAccessPath("download")] ValueTask Download(DownloadOptions options); /// Erase matching DownloadItems from history /// /// + [JsAccessPath("erase")] ValueTask> Erase(DownloadQuery query); /// Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, chrome.extension.lastError will contain an error message. /// The identifier for the download. /// /// + [JsAccessPath("getFileIcon")] ValueTask GetFileIcon(int downloadId, GetFileIconOptions options = null); /// Open the downloaded file. /// + [JsAccessPath("open")] ValueTask Open(int downloadId); /// Pause the download. If the request was successful the download is in a paused state. Otherwise chrome.extension.lastError contains an error message. The request will fail if the download is not active. /// The id of the download to pause. + [JsAccessPath("pause")] ValueTask Pause(int downloadId); /// /// + [JsAccessPath("removeFile")] ValueTask RemoveFile(int downloadId); /// Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise chrome.extension.lastError contains an error message. The request will fail if the download is not active. /// The id of the download to resume. + [JsAccessPath("resume")] ValueTask Resume(int downloadId); /// Find DownloadItems. Set query to the empty object to get all DownloadItems. To get a specific DownloadItem, set only the id field. /// /// + [JsAccessPath("search")] ValueTask> Search(DownloadQuery query); /// Show the downloaded file in its folder in a file manager. /// /// + [JsAccessPath("show")] ValueTask Show(int downloadId); /// + [JsAccessPath("showDefaultFolder")] ValueTask ShowDefaultFolder(); } } diff --git a/src/WebExtensions.Net/Generated/Downloads/OnChangedEvent.cs b/src/WebExtensions.Net/Generated/Downloads/OnChangedEvent.cs index 49f9b06..5d599be 100644 --- a/src/WebExtensions.Net/Generated/Downloads/OnChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/Downloads/OnChangedEvent.cs @@ -12,6 +12,7 @@ public partial class OnChangedEvent : Event { /// Registers an event listener callback to an event. /// When any of a DownloadItem's properties except bytesReceived changes, this event fires with the downloadId and an object containing the properties that changed. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Downloads/OnCreatedEvent.cs b/src/WebExtensions.Net/Generated/Downloads/OnCreatedEvent.cs index ffbea79..52d0484 100644 --- a/src/WebExtensions.Net/Generated/Downloads/OnCreatedEvent.cs +++ b/src/WebExtensions.Net/Generated/Downloads/OnCreatedEvent.cs @@ -12,6 +12,7 @@ public partial class OnCreatedEvent : Event { /// Registers an event listener callback to an event. /// This event fires with the DownloadItem object when a download begins. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Downloads/OnErasedEvent.cs b/src/WebExtensions.Net/Generated/Downloads/OnErasedEvent.cs index 78eabcd..9d1c0d6 100644 --- a/src/WebExtensions.Net/Generated/Downloads/OnErasedEvent.cs +++ b/src/WebExtensions.Net/Generated/Downloads/OnErasedEvent.cs @@ -12,6 +12,7 @@ public partial class OnErasedEvent : Event { /// Registers an event listener callback to an event. /// Fires with the downloadId when a download is erased from history. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Downloads/StringDelta.cs b/src/WebExtensions.Net/Generated/Downloads/StringDelta.cs index fb93af8..3f92b65 100644 --- a/src/WebExtensions.Net/Generated/Downloads/StringDelta.cs +++ b/src/WebExtensions.Net/Generated/Downloads/StringDelta.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Downloads public partial class StringDelta : BaseObject { /// + [JsAccessPath("current")] [JsonPropertyName("current")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Current { get; set; } /// + [JsAccessPath("previous")] [JsonPropertyName("previous")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Previous { get; set; } diff --git a/src/WebExtensions.Net/Generated/Events/Event.cs b/src/WebExtensions.Net/Generated/Events/Event.cs index b9e387c..57baaaf 100644 --- a/src/WebExtensions.Net/Generated/Events/Event.cs +++ b/src/WebExtensions.Net/Generated/Events/Event.cs @@ -11,6 +11,7 @@ public partial class Event : BaseObject { /// Registers an event listener callback to an event. /// Called when an event occurs. The parameters of this function depend on the type of event. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -19,6 +20,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -26,6 +28,7 @@ public virtual ValueTask HasListener(Action callback) /// /// True if any event listeners are registered to the event. + [JsAccessPath("hasListeners")] public virtual ValueTask HasListeners() { return InvokeAsync("hasListeners"); @@ -33,6 +36,7 @@ public virtual ValueTask HasListeners() /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Events/UrlFilter.cs b/src/WebExtensions.Net/Generated/Events/UrlFilter.cs index c6b3761..27485b3 100644 --- a/src/WebExtensions.Net/Generated/Events/UrlFilter.cs +++ b/src/WebExtensions.Net/Generated/Events/UrlFilter.cs @@ -10,101 +10,121 @@ namespace WebExtensions.Net.Events public partial class UrlFilter : BaseObject { /// Matches if the host name of the URL contains a specified string. To test whether a host name component has a prefix 'foo', use hostContains: '.foo'. This matches 'www.foobar.com' and 'foo.com', because an implicit dot is added at the beginning of the host name. Similarly, hostContains can be used to match against component suffix ('foo.') and to exactly match against components ('.foo.'). Suffix- and exact-matching for the last components need to be done separately using hostSuffix, because no implicit dot is added at the end of the host name. + [JsAccessPath("hostContains")] [JsonPropertyName("hostContains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string HostContains { get; set; } /// Matches if the host name of the URL is equal to a specified string. + [JsAccessPath("hostEquals")] [JsonPropertyName("hostEquals")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string HostEquals { get; set; } /// Matches if the host name of the URL starts with a specified string. + [JsAccessPath("hostPrefix")] [JsonPropertyName("hostPrefix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string HostPrefix { get; set; } /// Matches if the host name of the URL ends with a specified string. + [JsAccessPath("hostSuffix")] [JsonPropertyName("hostSuffix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string HostSuffix { get; set; } /// Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax. + [JsAccessPath("originAndPathMatches")] [JsonPropertyName("originAndPathMatches")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string OriginAndPathMatches { get; set; } /// Matches if the path segment of the URL contains a specified string. + [JsAccessPath("pathContains")] [JsonPropertyName("pathContains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string PathContains { get; set; } /// Matches if the path segment of the URL is equal to a specified string. + [JsAccessPath("pathEquals")] [JsonPropertyName("pathEquals")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string PathEquals { get; set; } /// Matches if the path segment of the URL starts with a specified string. + [JsAccessPath("pathPrefix")] [JsonPropertyName("pathPrefix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string PathPrefix { get; set; } /// Matches if the path segment of the URL ends with a specified string. + [JsAccessPath("pathSuffix")] [JsonPropertyName("pathSuffix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string PathSuffix { get; set; } /// Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. + [JsAccessPath("ports")] [JsonPropertyName("ports")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Ports { get; set; } /// Matches if the query segment of the URL contains a specified string. + [JsAccessPath("queryContains")] [JsonPropertyName("queryContains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string QueryContains { get; set; } /// Matches if the query segment of the URL is equal to a specified string. + [JsAccessPath("queryEquals")] [JsonPropertyName("queryEquals")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string QueryEquals { get; set; } /// Matches if the query segment of the URL starts with a specified string. + [JsAccessPath("queryPrefix")] [JsonPropertyName("queryPrefix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string QueryPrefix { get; set; } /// Matches if the query segment of the URL ends with a specified string. + [JsAccessPath("querySuffix")] [JsonPropertyName("querySuffix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string QuerySuffix { get; set; } /// Matches if the scheme of the URL is equal to any of the schemes specified in the array. + [JsAccessPath("schemes")] [JsonPropertyName("schemes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Schemes { get; set; } /// Matches if the URL (without fragment identifier) contains a specified string. Port numbers are stripped from the URL if they match the default port number. + [JsAccessPath("urlContains")] [JsonPropertyName("urlContains")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UrlContains { get; set; } /// Matches if the URL (without fragment identifier) is equal to a specified string. Port numbers are stripped from the URL if they match the default port number. + [JsAccessPath("urlEquals")] [JsonPropertyName("urlEquals")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UrlEquals { get; set; } /// Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax. + [JsAccessPath("urlMatches")] [JsonPropertyName("urlMatches")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UrlMatches { get; set; } /// Matches if the URL (without fragment identifier) starts with a specified string. Port numbers are stripped from the URL if they match the default port number. + [JsAccessPath("urlPrefix")] [JsonPropertyName("urlPrefix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UrlPrefix { get; set; } /// Matches if the URL (without fragment identifier) ends with a specified string. Port numbers are stripped from the URL if they match the default port number. + [JsAccessPath("urlSuffix")] [JsonPropertyName("urlSuffix")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UrlSuffix { get; set; } diff --git a/src/WebExtensions.Net/Generated/Extension/FetchProperties.cs b/src/WebExtensions.Net/Generated/Extension/FetchProperties.cs index c2721f3..000bf4e 100644 --- a/src/WebExtensions.Net/Generated/Extension/FetchProperties.cs +++ b/src/WebExtensions.Net/Generated/Extension/FetchProperties.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Extension public partial class FetchProperties : BaseObject { /// Find a view according to a tab id. If this field is omitted, returns all views. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TabId { get; set; } /// The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'popup', 'sidebar'. + [JsAccessPath("type")] [JsonPropertyName("type")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ViewType? Type { get; set; } /// The window to restrict the search to. If omitted, returns all views. + [JsAccessPath("windowId")] [JsonPropertyName("windowId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? WindowId { get; set; } diff --git a/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs b/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs index 964b400..05f4aeb 100644 --- a/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs +++ b/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using System; using System.Collections.Generic; using System.Text.Json; @@ -6,36 +7,44 @@ namespace WebExtensions.Net.Extension { /// The browser.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in $(topic:messaging)[Message Passing]. + [JsAccessPath("extension")] public partial interface IExtensionApi { /// True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior. + [JsAccessPath("inIncognitoContext")] bool? InIncognitoContext { get; } /// Set for the lifetime of a callback if an ansychronous extension api has resulted in an error. If no error has occured lastError will be undefined. + [JsAccessPath("lastError")] [Obsolete("Please use $(ref:runtime.lastError).")] LastError LastError { get; } /// Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page. /// + [JsAccessPath("getBackgroundPage")] ValueTask GetBackgroundPage(); /// Converts a relative path within an extension install directory to a fully-qualified URL. /// A path to a resource within an extension expressed relative to its install directory. /// The fully-qualified URL to the resource. + [JsAccessPath("getURL")] [Obsolete("Please use $(ref:runtime.getURL).")] ValueTask GetURL(string path); /// Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension. /// /// Array of global objects + [JsAccessPath("getViews")] ValueTask> GetViews(FetchProperties fetchProperties = null); /// Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox. /// True if the extension can access the 'file://' scheme, false otherwise. + [JsAccessPath("isAllowedFileSchemeAccess")] ValueTask IsAllowedFileSchemeAccess(); /// Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox. /// True if the extension has access to Incognito mode, false otherwise. + [JsAccessPath("isAllowedIncognitoAccess")] ValueTask IsAllowedIncognitoAccess(); } } diff --git a/src/WebExtensions.Net/Generated/Extension/LastError.cs b/src/WebExtensions.Net/Generated/Extension/LastError.cs index 8125f93..337474d 100644 --- a/src/WebExtensions.Net/Generated/Extension/LastError.cs +++ b/src/WebExtensions.Net/Generated/Extension/LastError.cs @@ -11,6 +11,7 @@ namespace WebExtensions.Net.Extension public partial class LastError : BaseObject { /// Description of the error that has taken place. + [JsAccessPath("message")] [JsonPropertyName("message")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Message { get; set; } diff --git a/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionCode.cs b/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionCode.cs index 5432ad1..067958e 100644 --- a/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionCode.cs +++ b/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionCode.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.ExtensionTypes public partial class ExtensionCode : BaseObject { /// + [JsAccessPath("code")] [JsonPropertyName("code")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Code { get; set; } diff --git a/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionFile.cs b/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionFile.cs index 87fd8d7..02bb3aa 100644 --- a/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionFile.cs +++ b/src/WebExtensions.Net/Generated/ExtensionTypes/ExtensionFile.cs @@ -10,6 +10,7 @@ namespace WebExtensions.Net.ExtensionTypes public partial class ExtensionFile : BaseObject { /// + [JsAccessPath("file")] [JsonPropertyName("file")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ExtensionUrl File { get; set; } diff --git a/src/WebExtensions.Net/Generated/ExtensionTypes/ImageDetails.cs b/src/WebExtensions.Net/Generated/ExtensionTypes/ImageDetails.cs index 4e3044f..cddbdb0 100644 --- a/src/WebExtensions.Net/Generated/ExtensionTypes/ImageDetails.cs +++ b/src/WebExtensions.Net/Generated/ExtensionTypes/ImageDetails.cs @@ -9,26 +9,31 @@ namespace WebExtensions.Net.ExtensionTypes public partial class ImageDetails : BaseObject { /// The format of the resulting image. Default is "jpeg". + [JsAccessPath("format")] [JsonPropertyName("format")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ImageFormat? Format { get; set; } /// When format is "jpeg", controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease. + [JsAccessPath("quality")] [JsonPropertyName("quality")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Quality { get; set; } /// The area of the document to capture, in CSS pixels, relative to the page. If omitted, capture the visible viewport. + [JsAccessPath("rect")] [JsonPropertyName("rect")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Rect Rect { get; set; } /// If true, temporarily resets the scroll position of the document to 0. Only takes effect if rect is also specified. + [JsAccessPath("resetScrollPosition")] [JsonPropertyName("resetScrollPosition")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ResetScrollPosition { get; set; } /// The scale of the resulting image. Defaults to devicePixelRatio. + [JsAccessPath("scale")] [JsonPropertyName("scale")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? Scale { get; set; } diff --git a/src/WebExtensions.Net/Generated/ExtensionTypes/InjectDetails.cs b/src/WebExtensions.Net/Generated/ExtensionTypes/InjectDetails.cs index 718c166..135235d 100644 --- a/src/WebExtensions.Net/Generated/ExtensionTypes/InjectDetails.cs +++ b/src/WebExtensions.Net/Generated/ExtensionTypes/InjectDetails.cs @@ -9,36 +9,43 @@ namespace WebExtensions.Net.ExtensionTypes public partial class InjectDetails : BaseObject { /// If allFrames is true, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's false and is only injected into the top frame. + [JsAccessPath("allFrames")] [JsonPropertyName("allFrames")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? AllFrames { get; set; } /// JavaScript or CSS code to inject.

'b'Warning:'/b'
Be careful using the code parameter. Incorrect use of it may open your extension to cross site scripting attacks.
+ [JsAccessPath("code")] [JsonPropertyName("code")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Code { get; set; } /// The css origin of the stylesheet to inject. Defaults to "author". + [JsAccessPath("cssOrigin")] [JsonPropertyName("cssOrigin")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public CSSOrigin? CssOrigin { get; set; } /// JavaScript or CSS file to inject. + [JsAccessPath("file")] [JsonPropertyName("file")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string File { get; set; } /// The ID of the frame to inject the script into. This may not be used in combination with allFrames. + [JsAccessPath("frameId")] [JsonPropertyName("frameId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? FrameId { get; set; } /// If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false. + [JsAccessPath("matchAboutBlank")] [JsonPropertyName("matchAboutBlank")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? MatchAboutBlank { get; set; } /// The soonest that the JavaScript or CSS will be injected into the tab. Defaults to "document_idle". + [JsAccessPath("runAt")] [JsonPropertyName("runAt")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public RunAt? RunAt { get; set; } diff --git a/src/WebExtensions.Net/Generated/ExtensionTypes/Rect.cs b/src/WebExtensions.Net/Generated/ExtensionTypes/Rect.cs index dd75a2e..51703fd 100644 --- a/src/WebExtensions.Net/Generated/ExtensionTypes/Rect.cs +++ b/src/WebExtensions.Net/Generated/ExtensionTypes/Rect.cs @@ -9,18 +9,22 @@ namespace WebExtensions.Net.ExtensionTypes public partial class Rect : BaseObject { /// + [JsAccessPath("height")] [JsonPropertyName("height")] public double Height { get; set; } /// + [JsAccessPath("width")] [JsonPropertyName("width")] public double Width { get; set; } /// + [JsAccessPath("x")] [JsonPropertyName("x")] public double X { get; set; } /// + [JsAccessPath("y")] [JsonPropertyName("y")] public double Y { get; set; } } diff --git a/src/WebExtensions.Net/Generated/History/AddUrlDetails.cs b/src/WebExtensions.Net/Generated/History/AddUrlDetails.cs index 559ced1..eab8613 100644 --- a/src/WebExtensions.Net/Generated/History/AddUrlDetails.cs +++ b/src/WebExtensions.Net/Generated/History/AddUrlDetails.cs @@ -10,21 +10,25 @@ namespace WebExtensions.Net.History public partial class AddUrlDetails : BaseObject { /// The title of the page. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// The $(topic:transition-types)[transition type] for this visit from its referrer. + [JsAccessPath("transition")] [JsonPropertyName("transition")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public TransitionType? Transition { get; set; } /// The URL to add. Must be a valid URL that can be added to history. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } /// The date when this visit occurred. + [JsAccessPath("visitTime")] [JsonPropertyName("visitTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Date VisitTime { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/Changed.cs b/src/WebExtensions.Net/Generated/History/Changed.cs index 7ee35fa..fa0a8c0 100644 --- a/src/WebExtensions.Net/Generated/History/Changed.cs +++ b/src/WebExtensions.Net/Generated/History/Changed.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.History public partial class Changed : BaseObject { /// The new title for the URL. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// The URL for which the title has changed + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/DeleteUrlDetails.cs b/src/WebExtensions.Net/Generated/History/DeleteUrlDetails.cs index d19079c..98e295e 100644 --- a/src/WebExtensions.Net/Generated/History/DeleteUrlDetails.cs +++ b/src/WebExtensions.Net/Generated/History/DeleteUrlDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.History public partial class DeleteUrlDetails : BaseObject { /// The URL to remove. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/GetVisitsDetails.cs b/src/WebExtensions.Net/Generated/History/GetVisitsDetails.cs index 5c8acc3..99c2146 100644 --- a/src/WebExtensions.Net/Generated/History/GetVisitsDetails.cs +++ b/src/WebExtensions.Net/Generated/History/GetVisitsDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.History public partial class GetVisitsDetails : BaseObject { /// The URL for which to retrieve visit information. It must be in the format as returned from a call to history.search. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/HistoryItem.cs b/src/WebExtensions.Net/Generated/History/HistoryItem.cs index 00879cd..f8e77de 100644 --- a/src/WebExtensions.Net/Generated/History/HistoryItem.cs +++ b/src/WebExtensions.Net/Generated/History/HistoryItem.cs @@ -9,31 +9,37 @@ namespace WebExtensions.Net.History public partial class HistoryItem : BaseObject { /// The unique identifier for the item. + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Id { get; set; } /// When this page was last loaded, represented in milliseconds since the epoch. + [JsAccessPath("lastVisitTime")] [JsonPropertyName("lastVisitTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public EpochTime? LastVisitTime { get; set; } /// The title of the page when it was last loaded. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// The number of times the user has navigated to this page by typing in the address. + [JsAccessPath("typedCount")] [JsonPropertyName("typedCount")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TypedCount { get; set; } /// The URL navigated to by a user. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } /// The number of times the user has navigated to this page. + [JsAccessPath("visitCount")] [JsonPropertyName("visitCount")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? VisitCount { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/IHistoryApi.cs b/src/WebExtensions.Net/Generated/History/IHistoryApi.cs index d7ff8d9..4391223 100644 --- a/src/WebExtensions.Net/Generated/History/IHistoryApi.cs +++ b/src/WebExtensions.Net/Generated/History/IHistoryApi.cs @@ -1,43 +1,54 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.History { /// Use the browser.history API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see $(topic:override)[Override Pages]. + [JsAccessPath("history")] public partial interface IHistoryApi { /// Fired when the title of a URL is changed in the browser history. + [JsAccessPath("onTitleChanged")] OnTitleChangedEvent OnTitleChanged { get; } /// Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded. + [JsAccessPath("onVisited")] OnVisitedEvent OnVisited { get; } /// Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history. + [JsAccessPath("onVisitRemoved")] OnVisitRemovedEvent OnVisitRemoved { get; } /// Adds a URL to the history with a default visitTime of the current time and a default $(topic:transition-types)[transition type] of "link". /// + [JsAccessPath("addUrl")] ValueTask AddUrl(AddUrlDetails details); /// Deletes all items from the history. + [JsAccessPath("deleteAll")] ValueTask DeleteAll(); /// Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range. /// + [JsAccessPath("deleteRange")] ValueTask DeleteRange(Range range); /// Removes all occurrences of the given URL from the history. /// + [JsAccessPath("deleteUrl")] ValueTask DeleteUrl(DeleteUrlDetails details); /// Retrieves information about visits to a URL. /// /// + [JsAccessPath("getVisits")] ValueTask> GetVisits(GetVisitsDetails details); /// Searches the history for the last visit time of each page matching the query. /// /// + [JsAccessPath("search")] ValueTask> Search(Query query); } } diff --git a/src/WebExtensions.Net/Generated/History/OnTitleChangedEvent.cs b/src/WebExtensions.Net/Generated/History/OnTitleChangedEvent.cs index a179c97..508c831 100644 --- a/src/WebExtensions.Net/Generated/History/OnTitleChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/History/OnTitleChangedEvent.cs @@ -12,6 +12,7 @@ public partial class OnTitleChangedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the title of a URL is changed in the browser history. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/History/OnVisitRemovedEvent.cs b/src/WebExtensions.Net/Generated/History/OnVisitRemovedEvent.cs index 3bcec89..4c04bd2 100644 --- a/src/WebExtensions.Net/Generated/History/OnVisitRemovedEvent.cs +++ b/src/WebExtensions.Net/Generated/History/OnVisitRemovedEvent.cs @@ -12,6 +12,7 @@ public partial class OnVisitRemovedEvent : Event { /// Registers an event listener callback to an event. /// Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/History/OnVisitedEvent.cs b/src/WebExtensions.Net/Generated/History/OnVisitedEvent.cs index e72398e..1ab0a5c 100644 --- a/src/WebExtensions.Net/Generated/History/OnVisitedEvent.cs +++ b/src/WebExtensions.Net/Generated/History/OnVisitedEvent.cs @@ -12,6 +12,7 @@ public partial class OnVisitedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/History/Query.cs b/src/WebExtensions.Net/Generated/History/Query.cs index ce13dab..6775a6c 100644 --- a/src/WebExtensions.Net/Generated/History/Query.cs +++ b/src/WebExtensions.Net/Generated/History/Query.cs @@ -10,21 +10,25 @@ namespace WebExtensions.Net.History public partial class Query : BaseObject { /// Limit results to those visited before this date. + [JsAccessPath("endTime")] [JsonPropertyName("endTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Date EndTime { get; set; } /// The maximum number of results to retrieve. Defaults to 100. + [JsAccessPath("maxResults")] [JsonPropertyName("maxResults")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? MaxResults { get; set; } /// Limit results to those visited after this date. If not specified, this defaults to 24 hours in the past. + [JsAccessPath("startTime")] [JsonPropertyName("startTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Date StartTime { get; set; } /// A free-text query to the history service. Leave empty to retrieve all pages. + [JsAccessPath("text")] [JsonPropertyName("text")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Text { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/Range.cs b/src/WebExtensions.Net/Generated/History/Range.cs index 6b3711e..47770d4 100644 --- a/src/WebExtensions.Net/Generated/History/Range.cs +++ b/src/WebExtensions.Net/Generated/History/Range.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.History public partial class Range : BaseObject { /// Items added to history before this date. + [JsAccessPath("endTime")] [JsonPropertyName("endTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Date EndTime { get; set; } /// Items added to history after this date. + [JsAccessPath("startTime")] [JsonPropertyName("startTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Date StartTime { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/Removed.cs b/src/WebExtensions.Net/Generated/History/Removed.cs index d3bdda1..4558fe1 100644 --- a/src/WebExtensions.Net/Generated/History/Removed.cs +++ b/src/WebExtensions.Net/Generated/History/Removed.cs @@ -10,10 +10,12 @@ namespace WebExtensions.Net.History public partial class Removed : BaseObject { /// True if all history was removed. If true, then urls will be empty. + [JsAccessPath("allHistory")] [JsonPropertyName("allHistory")] public bool AllHistory { get; set; } /// + [JsAccessPath("urls")] [JsonPropertyName("urls")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Urls { get; set; } diff --git a/src/WebExtensions.Net/Generated/History/VisitItem.cs b/src/WebExtensions.Net/Generated/History/VisitItem.cs index c448051..6fd566a 100644 --- a/src/WebExtensions.Net/Generated/History/VisitItem.cs +++ b/src/WebExtensions.Net/Generated/History/VisitItem.cs @@ -9,25 +9,30 @@ namespace WebExtensions.Net.History public partial class VisitItem : BaseObject { /// The unique identifier for the item. + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Id { get; set; } /// The visit ID of the referrer. + [JsAccessPath("referringVisitId")] [JsonPropertyName("referringVisitId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ReferringVisitId { get; set; } /// The $(topic:transition-types)[transition type] for this visit from its referrer. + [JsAccessPath("transition")] [JsonPropertyName("transition")] public TransitionType Transition { get; set; } /// The unique identifier for this visit. + [JsAccessPath("visitId")] [JsonPropertyName("visitId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string VisitId { get; set; } /// When this visit occurred, represented in milliseconds since the epoch. + [JsAccessPath("visitTime")] [JsonPropertyName("visitTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public EpochTime? VisitTime { get; set; } diff --git a/src/WebExtensions.Net/Generated/I18n/II18nApi.cs b/src/WebExtensions.Net/Generated/I18n/II18nApi.cs index 217ecc3..df82b2f 100644 --- a/src/WebExtensions.Net/Generated/I18n/II18nApi.cs +++ b/src/WebExtensions.Net/Generated/I18n/II18nApi.cs @@ -1,28 +1,34 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.I18n { /// Use the browser.i18n infrastructure to implement internationalization across your whole app or extension. + [JsAccessPath("i18n")] public partial interface II18nApi { /// Detects the language of the provided text using CLD. /// User input string to be translated. /// LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage + [JsAccessPath("detectLanguage")] ValueTask DetectLanguage(string text); /// Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use $(ref:i18n.getUILanguage). /// Array of LanguageCode + [JsAccessPath("getAcceptLanguages")] ValueTask> GetAcceptLanguages(); /// Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong - for example, messageName is not a string or the substitutions array has more than 9 elements - this method returns undefined. /// The name of the message, as specified in the $(topic:i18n-messages)[messages.json] file. /// Substitution strings, if the message requires any. /// Message localized for current locale. + [JsAccessPath("getMessage")] ValueTask GetMessage(string messageName, object substitutions = null); /// Gets the browser UI language of the browser. This is different from $(ref:i18n.getAcceptLanguages) which returns the preferred user languages. /// The browser UI language code such as en-US or fr-FR. + [JsAccessPath("getUILanguage")] ValueTask GetUILanguage(); } } diff --git a/src/WebExtensions.Net/Generated/I18n/LanguageType.cs b/src/WebExtensions.Net/Generated/I18n/LanguageType.cs index 61d56b5..341069c 100644 --- a/src/WebExtensions.Net/Generated/I18n/LanguageType.cs +++ b/src/WebExtensions.Net/Generated/I18n/LanguageType.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.I18n public partial class LanguageType : BaseObject { /// + [JsAccessPath("language")] [JsonPropertyName("language")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public LanguageCode Language { get; set; } /// The percentage of the detected language + [JsAccessPath("percentage")] [JsonPropertyName("percentage")] public int Percentage { get; set; } } diff --git a/src/WebExtensions.Net/Generated/I18n/Result.cs b/src/WebExtensions.Net/Generated/I18n/Result.cs index 6061434..feb7f79 100644 --- a/src/WebExtensions.Net/Generated/I18n/Result.cs +++ b/src/WebExtensions.Net/Generated/I18n/Result.cs @@ -10,10 +10,12 @@ namespace WebExtensions.Net.I18n public partial class Result : BaseObject { /// CLD detected language reliability + [JsAccessPath("isReliable")] [JsonPropertyName("isReliable")] public bool IsReliable { get; set; } /// array of detectedLanguage + [JsAccessPath("languages")] [JsonPropertyName("languages")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Languages { get; set; } diff --git a/src/WebExtensions.Net/Generated/IWebExtensionsApi.cs b/src/WebExtensions.Net/Generated/IWebExtensionsApi.cs index 14fa68f..17ff88e 100644 --- a/src/WebExtensions.Net/Generated/IWebExtensionsApi.cs +++ b/src/WebExtensions.Net/Generated/IWebExtensionsApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using System; using WebExtensions.Net.ActionNs; using WebExtensions.Net.Alarms; @@ -39,115 +40,152 @@ namespace WebExtensions.Net { /// Web Extension Api + [JsAccessPath("browser")] public partial interface IWebExtensionsApi { /// Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.
Requires manifest permission manifest:action, manifest:browser_action.
+ [JsAccessPath("action")] IActionApi Action { get; } ///
Requires manifest permission alarms.
+ [JsAccessPath("alarms")] IAlarmsApi Alarms { get; } /// Use the browser.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see $(topic:override)[Override Pages], which you can use to create a custom Bookmark Manager page.
Requires manifest permission bookmarks.
+ [JsAccessPath("bookmarks")] IBookmarksApi Bookmarks { get; } /// Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.
Requires manifest permission manifest:action, manifest:browser_action.
+ [JsAccessPath("browserAction")] [Obsolete("Deprecated in Manifest V3, use action API.")] IBrowserActionApi BrowserAction { get; } /// Use the browser.browserSettings API to control global settings of the browser.
Requires manifest permission browserSettings.
+ [JsAccessPath("browserSettings")] IBrowserSettingsApi BrowserSettings { get; } /// Use the chrome.browsingData API to remove browsing data from a user's local profile.
Requires manifest permission browsingData.
+ [JsAccessPath("browsingData")] IBrowsingDataApi BrowsingData { get; } /// Offers the ability to write to the clipboard. Reading is not supported because the clipboard can already be read through the standard web platform APIs.
Requires manifest permission clipboardWrite.
+ [JsAccessPath("clipboard")] IClipboardApi Clipboard { get; } /// Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the xtension.
Requires manifest permission manifest:commands.
+ [JsAccessPath("commands")] ICommandsApi Commands { get; } /// + [JsAccessPath("contentScripts")] IContentScriptsApi ContentScripts { get; } /// Use the browser.cookies API to query and modify cookies, and to be notified when they change.
Requires manifest permission cookies.
+ [JsAccessPath("cookies")] ICookiesApi Cookies { get; } /// Use the declarativeNetRequest API to block or modify network requests by specifying declarative rules.
Requires manifest permission declarativeNetRequest, declarativeNetRequestWithHostAccess.
+ [JsAccessPath("declarativeNetRequest")] IDeclarativeNetRequestApi DeclarativeNetRequest { get; } ///
Requires manifest permission manifest:devtools_page.
+ [JsAccessPath("devtools")] IDevtoolsApi Devtools { get; } ///
Requires manifest permission downloads.
+ [JsAccessPath("downloads")] IDownloadsApi Downloads { get; } /// The browser.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in $(topic:messaging)[Message Passing]. + [JsAccessPath("extension")] IExtensionApi Extension { get; } /// Use the browser.history API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see $(topic:override)[Override Pages].
Requires manifest permission history.
+ [JsAccessPath("history")] IHistoryApi History { get; } /// Use the browser.i18n infrastructure to implement internationalization across your whole app or extension. + [JsAccessPath("i18n")] II18nApi I18n { get; } /// Use the chrome.identity API to get OAuth2 access tokens.
Requires manifest permission identity.
+ [JsAccessPath("identity")] IIdentityApi Identity { get; } /// Use the browser.idle API to detect when the machine's idle state changes.
Requires manifest permission idle.
+ [JsAccessPath("idle")] IIdleApi Idle { get; } /// The browser.management API provides ways to manage the list of extensions that are installed and running. + [JsAccessPath("management")] IManagementApi Management { get; } /// The part of the menus API that is available in all extension contexts, including content scripts. Use the browser.menus API to add items to the browser's menus. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.
Requires manifest permission menus.
+ [JsAccessPath("menus")] IMenusApi Menus { get; } ///
Requires manifest permission notifications.
+ [JsAccessPath("notifications")] INotificationsApi Notifications { get; } /// The omnibox API allows you to register a keyword with Firefox's address bar.
Requires manifest permission manifest:omnibox.
+ [JsAccessPath("omnibox")] IOmniboxApi Omnibox { get; } /// Use the browser.pageAction API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.
Requires manifest permission manifest:page_action.
+ [JsAccessPath("pageAction")] IPageActionApi PageAction { get; } /// + [JsAccessPath("permissions")] IPermissionsApi Permissions { get; } ///
Requires manifest permission privacy.
+ [JsAccessPath("privacy")] IPrivacyApi Privacy { get; } /// Provides access to global proxy settings for Firefox and proxy event listeners to handle dynamic proxy implementations.
Requires manifest permission proxy.
+ [JsAccessPath("proxy")] IProxyApi Proxy { get; } /// Use the browser.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs. + [JsAccessPath("runtime")] IRuntimeApi Runtime { get; } /// Use the scripting API to execute script in different contexts.
Requires manifest permission scripting.
+ [JsAccessPath("scripting")] IScriptingApi Scripting { get; } /// Use browser.search to interact with search engines.
Requires manifest permission search.
+ [JsAccessPath("search")] ISearchApi Search { get; } /// Use the chrome.sessions API to query and restore tabs and windows from a browsing session.
Requires manifest permission sessions.
+ [JsAccessPath("sessions")] ISessionsApi Sessions { get; } /// Use the browser.storage API to store, retrieve, and track changes to user data.
Requires manifest permission storage.
+ [JsAccessPath("storage")] IStorageApi Storage { get; } /// Use the browser.tabs API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser. + [JsAccessPath("tabs")] ITabsApi Tabs { get; } /// Use the chrome.topSites API to access the top sites that are displayed on the new tab page.
Requires manifest permission topSites.
+ [JsAccessPath("topSites")] ITopSitesApi TopSites { get; } /// Use the browser.webNavigation API to receive notifications about the status of navigation requests in-flight.
Requires manifest permission webNavigation.
+ [JsAccessPath("webNavigation")] IWebNavigationApi WebNavigation { get; } /// Use the browser.webRequest API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
Requires manifest permission webRequest.
+ [JsAccessPath("webRequest")] IWebRequestApi WebRequest { get; } /// Use the browser.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser. + [JsAccessPath("windows")] IWindowsApi Windows { get; } } } diff --git a/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs b/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs index 7a4404e..0734250 100644 --- a/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs +++ b/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs @@ -1,18 +1,22 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.Identity { /// Use the chrome.identity API to get OAuth2 access tokens. + [JsAccessPath("identity")] public partial interface IIdentityApi { /// Generates a redirect URL to be used in |launchWebAuthFlow|. /// The path appended to the end of the generated URL. /// + [JsAccessPath("getRedirectURL")] ValueTask GetRedirectURL(string path = null); /// Starts an auth flow at the specified URL. /// /// + [JsAccessPath("launchWebAuthFlow")] ValueTask LaunchWebAuthFlow(LaunchWebAuthFlowDetails details); } } diff --git a/src/WebExtensions.Net/Generated/Identity/LaunchWebAuthFlowDetails.cs b/src/WebExtensions.Net/Generated/Identity/LaunchWebAuthFlowDetails.cs index 348b9c5..e9c54d6 100644 --- a/src/WebExtensions.Net/Generated/Identity/LaunchWebAuthFlowDetails.cs +++ b/src/WebExtensions.Net/Generated/Identity/LaunchWebAuthFlowDetails.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.Identity public partial class LaunchWebAuthFlowDetails : BaseObject { /// + [JsAccessPath("interactive")] [JsonPropertyName("interactive")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Interactive { get; set; } /// + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public HttpUrl Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Idle/IIdleApi.cs b/src/WebExtensions.Net/Generated/Idle/IIdleApi.cs index 0a55972..f423953 100644 --- a/src/WebExtensions.Net/Generated/Idle/IIdleApi.cs +++ b/src/WebExtensions.Net/Generated/Idle/IIdleApi.cs @@ -1,20 +1,25 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.Idle { /// Use the browser.idle API to detect when the machine's idle state changes. + [JsAccessPath("idle")] public partial interface IIdleApi { /// Fired when the system changes to an active or idle state. The event fires with "idle" if the the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system. + [JsAccessPath("onStateChanged")] OnStateChangedEvent OnStateChanged { get; } /// Returns "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise. /// The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected. /// + [JsAccessPath("queryState")] ValueTask QueryState(int detectionIntervalInSeconds); /// Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds. /// Threshold, in seconds, used to determine when the system is in an idle state. + [JsAccessPath("setDetectionInterval")] ValueTask SetDetectionInterval(int intervalInSeconds); } } diff --git a/src/WebExtensions.Net/Generated/Idle/OnStateChangedEvent.cs b/src/WebExtensions.Net/Generated/Idle/OnStateChangedEvent.cs index af528f9..0cb137e 100644 --- a/src/WebExtensions.Net/Generated/Idle/OnStateChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/Idle/OnStateChangedEvent.cs @@ -12,6 +12,7 @@ public partial class OnStateChangedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the system changes to an active or idle state. The event fires with "idle" if the the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Management/ExtensionInfo.cs b/src/WebExtensions.Net/Generated/Management/ExtensionInfo.cs index 946fc37..d48d115 100644 --- a/src/WebExtensions.Net/Generated/Management/ExtensionInfo.cs +++ b/src/WebExtensions.Net/Generated/Management/ExtensionInfo.cs @@ -10,82 +10,99 @@ namespace WebExtensions.Net.Management public partial class ExtensionInfo : BaseObject { /// The description of this extension. + [JsAccessPath("description")] [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Description { get; set; } /// A reason the item is disabled. + [JsAccessPath("disabledReason")] [JsonPropertyName("disabledReason")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ExtensionDisabledReason? DisabledReason { get; set; } /// Whether it is currently enabled or disabled. + [JsAccessPath("enabled")] [JsonPropertyName("enabled")] public bool Enabled { get; set; } /// The URL of the homepage of this extension. + [JsAccessPath("homepageUrl")] [JsonPropertyName("homepageUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string HomepageUrl { get; set; } /// Returns a list of host based permissions. + [JsAccessPath("hostPermissions")] [JsonPropertyName("hostPermissions")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable HostPermissions { get; set; } /// A list of icon information. Note that this just reflects what was declared in the manifest, and the actual image at that url may be larger or smaller than what was declared, so you might consider using explicit width and height attributes on img tags referencing these images. See the manifest documentation on icons for more details. + [JsAccessPath("icons")] [JsonPropertyName("icons")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Icons { get; set; } /// The extension's unique identifier. + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Id { get; set; } /// How the extension was installed. + [JsAccessPath("installType")] [JsonPropertyName("installType")] public ExtensionInstallType InstallType { get; set; } /// Whether this extension can be disabled or uninstalled by the user. + [JsAccessPath("mayDisable")] [JsonPropertyName("mayDisable")] public bool MayDisable { get; set; } /// The name of this extension. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The url for the item's options page, if it has one. + [JsAccessPath("optionsUrl")] [JsonPropertyName("optionsUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string OptionsUrl { get; set; } /// Returns a list of API based permissions. + [JsAccessPath("permissions")] [JsonPropertyName("permissions")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Permissions { get; set; } /// A short version of the name of this extension. + [JsAccessPath("shortName")] [JsonPropertyName("shortName")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ShortName { get; set; } /// The type of this extension, 'extension' or 'theme'. + [JsAccessPath("type")] [JsonPropertyName("type")] public ExtensionType Type { get; set; } /// The update URL of this extension. + [JsAccessPath("updateUrl")] [JsonPropertyName("updateUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string UpdateUrl { get; set; } /// The version of this extension. + [JsAccessPath("version")] [JsonPropertyName("version")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Version { get; set; } /// The version name of this extension if the manifest specified one. + [JsAccessPath("versionName")] [JsonPropertyName("versionName")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string VersionName { get; set; } diff --git a/src/WebExtensions.Net/Generated/Management/IManagementApi.cs b/src/WebExtensions.Net/Generated/Management/IManagementApi.cs index efc0559..eb9bd33 100644 --- a/src/WebExtensions.Net/Generated/Management/IManagementApi.cs +++ b/src/WebExtensions.Net/Generated/Management/IManagementApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; using WebExtensions.Net.Manifest; @@ -5,45 +6,56 @@ namespace WebExtensions.Net.Management { /// The browser.management API provides ways to manage the list of extensions that are installed and running. + [JsAccessPath("management")] public partial interface IManagementApi { /// Fired when an addon has been disabled. + [JsAccessPath("onDisabled")] OnDisabledEvent OnDisabled { get; } /// Fired when an addon has been enabled. + [JsAccessPath("onEnabled")] OnEnabledEvent OnEnabled { get; } /// Fired when an addon has been installed. + [JsAccessPath("onInstalled")] OnInstalledEvent OnInstalled { get; } /// Fired when an addon has been uninstalled. + [JsAccessPath("onUninstalled")] OnUninstalledEvent OnUninstalled { get; } /// Returns information about the installed extension that has the given ID. /// The ID from an item of $(ref:management.ExtensionInfo). /// + [JsAccessPath("get")] ValueTask Get(ExtensionID id); /// Returns a list of information about installed extensions. /// + [JsAccessPath("getAll")] ValueTask> GetAll(); /// Returns information about the calling extension. Note: This function can be used without requesting the 'management' permission in the manifest. /// + [JsAccessPath("getSelf")] ValueTask GetSelf(); /// Installs and enables a theme extension from the given url. /// /// + [JsAccessPath("install")] ValueTask Install(InstallOptions options); /// Enables or disables the given add-on. /// ID of the add-on to enable/disable. /// Whether to enable or disable the add-on. + [JsAccessPath("setEnabled")] ValueTask SetEnabled(string id, bool enabled); /// Uninstalls the calling extension. Note: This function can be used without requesting the 'management' permission in the manifest. /// + [JsAccessPath("uninstallSelf")] ValueTask UninstallSelf(UninstallSelfOptions options = null); } } diff --git a/src/WebExtensions.Net/Generated/Management/IconInfo.cs b/src/WebExtensions.Net/Generated/Management/IconInfo.cs index 7b704f2..a24e80c 100644 --- a/src/WebExtensions.Net/Generated/Management/IconInfo.cs +++ b/src/WebExtensions.Net/Generated/Management/IconInfo.cs @@ -9,10 +9,12 @@ namespace WebExtensions.Net.Management public partial class IconInfo : BaseObject { /// A number representing the width and height of the icon. Likely values include (but are not limited to) 128, 48, 24, and 16. + [JsAccessPath("size")] [JsonPropertyName("size")] public int Size { get; set; } /// The URL for this icon image. To display a grayscale version of the icon (to indicate that an extension is disabled, for example), append ?grayscale=true to the URL. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Management/InstallOptions.cs b/src/WebExtensions.Net/Generated/Management/InstallOptions.cs index 82f90e7..96debbe 100644 --- a/src/WebExtensions.Net/Generated/Management/InstallOptions.cs +++ b/src/WebExtensions.Net/Generated/Management/InstallOptions.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.Management public partial class InstallOptions : BaseObject { /// A hash of the XPI file, using sha256 or stronger. + [JsAccessPath("hash")] [JsonPropertyName("hash")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Hash { get; set; } /// URL pointing to the XPI file on addons.mozilla.org or similar. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public HttpUrl Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Management/OnDisabledEvent.cs b/src/WebExtensions.Net/Generated/Management/OnDisabledEvent.cs index c80d7a4..1b0afbb 100644 --- a/src/WebExtensions.Net/Generated/Management/OnDisabledEvent.cs +++ b/src/WebExtensions.Net/Generated/Management/OnDisabledEvent.cs @@ -12,6 +12,7 @@ public partial class OnDisabledEvent : Event { /// Registers an event listener callback to an event. /// Fired when an addon has been disabled. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Management/OnEnabledEvent.cs b/src/WebExtensions.Net/Generated/Management/OnEnabledEvent.cs index bf02fb4..c34027a 100644 --- a/src/WebExtensions.Net/Generated/Management/OnEnabledEvent.cs +++ b/src/WebExtensions.Net/Generated/Management/OnEnabledEvent.cs @@ -12,6 +12,7 @@ public partial class OnEnabledEvent : Event { /// Registers an event listener callback to an event. /// Fired when an addon has been enabled. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Management/OnInstalledEvent.cs b/src/WebExtensions.Net/Generated/Management/OnInstalledEvent.cs index 0079268..963b0fa 100644 --- a/src/WebExtensions.Net/Generated/Management/OnInstalledEvent.cs +++ b/src/WebExtensions.Net/Generated/Management/OnInstalledEvent.cs @@ -12,6 +12,7 @@ public partial class OnInstalledEvent : Event { /// Registers an event listener callback to an event. /// Fired when an addon has been installed. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Management/OnUninstalledEvent.cs b/src/WebExtensions.Net/Generated/Management/OnUninstalledEvent.cs index 5f98e93..01f06ca 100644 --- a/src/WebExtensions.Net/Generated/Management/OnUninstalledEvent.cs +++ b/src/WebExtensions.Net/Generated/Management/OnUninstalledEvent.cs @@ -12,6 +12,7 @@ public partial class OnUninstalledEvent : Event { /// Registers an event listener callback to an event. /// Fired when an addon has been uninstalled. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Management/Result.cs b/src/WebExtensions.Net/Generated/Management/Result.cs index 90c5f2c..f1a578d 100644 --- a/src/WebExtensions.Net/Generated/Management/Result.cs +++ b/src/WebExtensions.Net/Generated/Management/Result.cs @@ -10,6 +10,7 @@ namespace WebExtensions.Net.Management public partial class Result : BaseObject { /// + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ExtensionID Id { get; set; } diff --git a/src/WebExtensions.Net/Generated/Management/UninstallSelfOptions.cs b/src/WebExtensions.Net/Generated/Management/UninstallSelfOptions.cs index 307e351..19c8c65 100644 --- a/src/WebExtensions.Net/Generated/Management/UninstallSelfOptions.cs +++ b/src/WebExtensions.Net/Generated/Management/UninstallSelfOptions.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Management public partial class UninstallSelfOptions : BaseObject { /// The message to display to a user when being asked to confirm removal of the extension. + [JsAccessPath("dialogMessage")] [JsonPropertyName("dialogMessage")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string DialogMessage { get; set; } /// Whether or not a confirm-uninstall dialog should prompt the user. Defaults to false. + [JsAccessPath("showConfirmDialog")] [JsonPropertyName("showConfirmDialog")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ShowConfirmDialog { get; set; } diff --git a/src/WebExtensions.Net/Generated/Menus/ContextOptions.cs b/src/WebExtensions.Net/Generated/Menus/ContextOptions.cs index 3b51ad7..5bd89ca 100644 --- a/src/WebExtensions.Net/Generated/Menus/ContextOptions.cs +++ b/src/WebExtensions.Net/Generated/Menus/ContextOptions.cs @@ -9,21 +9,25 @@ namespace WebExtensions.Net.Menus public partial class ContextOptions : BaseObject { /// Required when context is 'bookmark'. Requires 'bookmark' permission. + [JsAccessPath("bookmarkId")] [JsonPropertyName("bookmarkId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string BookmarkId { get; set; } /// ContextType to override, to allow menu items from other extensions in the menu. Currently only 'bookmark' and 'tab' are supported. showDefaults cannot be used with this option. + [JsAccessPath("context")] [JsonPropertyName("context")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Context { get; set; } /// Whether to also include default menu items in the menu. + [JsAccessPath("showDefaults")] [JsonPropertyName("showDefaults")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ShowDefaults { get; set; } /// Required when context is 'tab'. Requires 'tabs' permission. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TabId { get; set; } diff --git a/src/WebExtensions.Net/Generated/Menus/CreateProperties.cs b/src/WebExtensions.Net/Generated/Menus/CreateProperties.cs index 0b0503b..acbca56 100644 --- a/src/WebExtensions.Net/Generated/Menus/CreateProperties.cs +++ b/src/WebExtensions.Net/Generated/Menus/CreateProperties.cs @@ -13,71 +13,85 @@ namespace WebExtensions.Net.Menus public partial class CreateProperties : BaseObject { /// The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items. + [JsAccessPath("checked")] [JsonPropertyName("checked")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Checked { get; set; } /// Specifies a command to issue for the context click. + [JsAccessPath("command")] [JsonPropertyName("command")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Command Command { get; set; } /// List of contexts this menu item will appear in. Defaults to ['page'] if not specified. + [JsAccessPath("contexts")] [JsonPropertyName("contexts")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Contexts { get; set; } /// Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see $(topic:match_patterns)[Match Patterns]. + [JsAccessPath("documentUrlPatterns")] [JsonPropertyName("documentUrlPatterns")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable DocumentUrlPatterns { get; set; } /// Whether this context menu item is enabled or disabled. Defaults to true. + [JsAccessPath("enabled")] [JsonPropertyName("enabled")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Enabled { get; set; } /// + [JsAccessPath("icons")] [JsonPropertyName("icons")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public object Icons { get; set; } /// The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Id { get; set; } /// A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for $(ref:contextMenus.onClicked). + [JsAccessPath("onclick")] [JsonPropertyName("onclick")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Action Onclick { get; set; } /// The ID of a parent menu item; this makes the item a child of a previously added item. + [JsAccessPath("parentId")] [JsonPropertyName("parentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public CreatePropertiesParentId ParentId { get; set; } /// Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags. + [JsAccessPath("targetUrlPatterns")] [JsonPropertyName("targetUrlPatterns")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable TargetUrlPatterns { get; set; } /// The text to be displayed in the item; this is required unless type is 'separator'. When the context is 'selection', you can use %s within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// The type of menu item. Defaults to 'normal' if not specified. + [JsAccessPath("type")] [JsonPropertyName("type")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ItemType? Type { get; set; } /// List of view types where the menu item will be shown. Defaults to any view, including those without a viewType. + [JsAccessPath("viewTypes")] [JsonPropertyName("viewTypes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ViewTypes { get; set; } /// Whether the item is visible in the menu. + [JsAccessPath("visible")] [JsonPropertyName("visible")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Visible { get; set; } diff --git a/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs b/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs index 2414b64..ad512dd 100644 --- a/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs +++ b/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using System; using System.Text.Json; using System.Threading.Tasks; @@ -6,57 +7,71 @@ namespace WebExtensions.Net.Menus { /// The part of the menus API that is available in all extension contexts, including content scripts. + [JsAccessPath("menus")] public partial interface IMenusApi { /// The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored. + [JsAccessPath("ACTION_MENU_TOP_LEVEL_LIMIT")] int ACTION_MENU_TOP_LEVEL_LIMIT { get; } /// Fired when a context menu item is clicked. + [JsAccessPath("onClicked")] OnClickedEvent OnClicked { get; } /// Fired when a menu is hidden. This event is only fired if onShown has fired before. + [JsAccessPath("onHidden")] Event OnHidden { get; } /// Fired when a menu is shown. The extension can add, modify or remove menu items and call menus.refresh() to update the menu. + [JsAccessPath("onShown")] OnShownEvent OnShown { get; } /// Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in $(ref:runtime.lastError)). /// /// Called when the item has been created in the browser. If there were any problems creating the item, details will be available in $(ref:runtime.lastError). /// The ID of the newly created item. + [JsAccessPath("create")] ValueTask Create(CreateProperties createProperties, Action callback = null); /// Retrieve the element that was associated with a recent contextmenu event. /// The identifier of the clicked element, available as info.targetElementId in the menus.onShown, onClicked or onclick event. /// + [JsAccessPath("getTargetElement")] ValueTask GetTargetElement(int targetElementId); /// Show the matching menu items from this extension instead of the default menu. This should be called during a 'contextmenu' DOM event handler, and only applies to the menu that opens after this event. /// + [JsAccessPath("overrideContext")] ValueTask OverrideContext(ContextOptions contextOptions); /// Updates the extension items in the shown menu, including changes that have been made since the menu was shown. Has no effect if the menu is hidden. Rebuilding a shown menu is an expensive operation, only invoke this method when necessary. + [JsAccessPath("refresh")] ValueTask Refresh(); /// Removes a context menu item. /// The ID of the context menu item to remove. + [JsAccessPath("remove")] ValueTask Remove(int menuItemId); /// Removes a context menu item. /// The ID of the context menu item to remove. + [JsAccessPath("remove")] ValueTask Remove(string menuItemId); /// Removes all context menu items added by this extension. + [JsAccessPath("removeAll")] ValueTask RemoveAll(); /// Updates a previously created context menu item. /// The ID of the item to update. /// The properties to update. Accepts the same values as the create function. + [JsAccessPath("update")] ValueTask Update(int id, UpdateProperties updateProperties); /// Updates a previously created context menu item. /// The ID of the item to update. /// The properties to update. Accepts the same values as the create function. + [JsAccessPath("update")] ValueTask Update(string id, UpdateProperties updateProperties); } } diff --git a/src/WebExtensions.Net/Generated/Menus/Info.cs b/src/WebExtensions.Net/Generated/Menus/Info.cs index 005d859..d19a538 100644 --- a/src/WebExtensions.Net/Generated/Menus/Info.cs +++ b/src/WebExtensions.Net/Generated/Menus/Info.cs @@ -11,60 +11,72 @@ namespace WebExtensions.Net.Menus public partial class Info : BaseObject { /// A list of all contexts that apply to the menu. + [JsAccessPath("contexts")] [JsonPropertyName("contexts")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Contexts { get; set; } /// + [JsAccessPath("editable")] [JsonPropertyName("editable")] public bool Editable { get; set; } /// + [JsAccessPath("frameUrl")] [JsonPropertyName("frameUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FrameUrl { get; set; } /// + [JsAccessPath("linkText")] [JsonPropertyName("linkText")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string LinkText { get; set; } /// + [JsAccessPath("linkUrl")] [JsonPropertyName("linkUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string LinkUrl { get; set; } /// + [JsAccessPath("mediaType")] [JsonPropertyName("mediaType")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string MediaType { get; set; } /// A list of IDs of the menu items that were shown. + [JsAccessPath("menuIds")] [JsonPropertyName("menuIds")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable MenuIds { get; set; } /// + [JsAccessPath("pageUrl")] [JsonPropertyName("pageUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string PageUrl { get; set; } /// + [JsAccessPath("selectionText")] [JsonPropertyName("selectionText")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string SelectionText { get; set; } /// + [JsAccessPath("srcUrl")] [JsonPropertyName("srcUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string SrcUrl { get; set; } /// + [JsAccessPath("targetElementId")] [JsonPropertyName("targetElementId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TargetElementId { get; set; } /// + [JsAccessPath("viewType")] [JsonPropertyName("viewType")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ViewType? ViewType { get; set; } diff --git a/src/WebExtensions.Net/Generated/Menus/OnClickData.cs b/src/WebExtensions.Net/Generated/Menus/OnClickData.cs index 195abfe..89f6655 100644 --- a/src/WebExtensions.Net/Generated/Menus/OnClickData.cs +++ b/src/WebExtensions.Net/Generated/Menus/OnClickData.cs @@ -11,90 +11,108 @@ namespace WebExtensions.Net.Menus public partial class OnClickData : BaseObject { /// The id of the bookmark where the context menu was clicked, if it was on a bookmark. + [JsAccessPath("bookmarkId")] [JsonPropertyName("bookmarkId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string BookmarkId { get; set; } /// An integer value of button by which menu item was clicked. + [JsAccessPath("button")] [JsonPropertyName("button")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Button { get; set; } /// A flag indicating the state of a checkbox or radio item after it is clicked. + [JsAccessPath("checked")] [JsonPropertyName("checked")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Checked { get; set; } /// A flag indicating whether the element is editable (text input, textarea, etc.). + [JsAccessPath("editable")] [JsonPropertyName("editable")] public bool Editable { get; set; } /// The id of the frame of the element where the context menu was clicked. + [JsAccessPath("frameId")] [JsonPropertyName("frameId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? FrameId { get; set; } /// The URL of the frame of the element where the context menu was clicked, if it was in a frame. + [JsAccessPath("frameUrl")] [JsonPropertyName("frameUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string FrameUrl { get; set; } /// If the element is a link, the text of that link. + [JsAccessPath("linkText")] [JsonPropertyName("linkText")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string LinkText { get; set; } /// If the element is a link, the URL it points to. + [JsAccessPath("linkUrl")] [JsonPropertyName("linkUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string LinkUrl { get; set; } /// One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements. + [JsAccessPath("mediaType")] [JsonPropertyName("mediaType")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string MediaType { get; set; } /// The ID of the menu item that was clicked. + [JsAccessPath("menuItemId")] [JsonPropertyName("menuItemId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public OnClickDataMenuItemId MenuItemId { get; set; } /// An array of keyboard modifiers that were held while the menu item was clicked. + [JsAccessPath("modifiers")] [JsonPropertyName("modifiers")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Modifiers { get; set; } /// The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu. + [JsAccessPath("pageUrl")] [JsonPropertyName("pageUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string PageUrl { get; set; } /// The parent ID, if any, for the item clicked. + [JsAccessPath("parentMenuItemId")] [JsonPropertyName("parentMenuItemId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ParentMenuItemId ParentMenuItemId { get; set; } /// The text for the context selection, if any. + [JsAccessPath("selectionText")] [JsonPropertyName("selectionText")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string SelectionText { get; set; } /// Will be present for elements with a 'src' URL. + [JsAccessPath("srcUrl")] [JsonPropertyName("srcUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string SrcUrl { get; set; } /// An identifier of the clicked element, if any. Use menus.getTargetElement in the page to find the corresponding element. + [JsAccessPath("targetElementId")] [JsonPropertyName("targetElementId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TargetElementId { get; set; } /// The type of view where the menu is clicked. May be unset if the menu is not associated with a view. + [JsAccessPath("viewType")] [JsonPropertyName("viewType")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ViewType? ViewType { get; set; } /// A flag indicating the state of a checkbox or radio item before it was clicked. + [JsAccessPath("wasChecked")] [JsonPropertyName("wasChecked")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? WasChecked { get; set; } diff --git a/src/WebExtensions.Net/Generated/Menus/OnClickedEvent.cs b/src/WebExtensions.Net/Generated/Menus/OnClickedEvent.cs index a435ad1..a15901a 100644 --- a/src/WebExtensions.Net/Generated/Menus/OnClickedEvent.cs +++ b/src/WebExtensions.Net/Generated/Menus/OnClickedEvent.cs @@ -13,6 +13,7 @@ public partial class OnClickedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a context menu item is clicked. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -21,6 +22,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -28,6 +30,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Menus/OnShownEvent.cs b/src/WebExtensions.Net/Generated/Menus/OnShownEvent.cs index dfe98c7..87490b3 100644 --- a/src/WebExtensions.Net/Generated/Menus/OnShownEvent.cs +++ b/src/WebExtensions.Net/Generated/Menus/OnShownEvent.cs @@ -13,6 +13,7 @@ public partial class OnShownEvent : Event { /// Registers an event listener callback to an event. /// Fired when a menu is shown. The extension can add, modify or remove menu items and call menus.refresh() to update the menu. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -21,6 +22,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -28,6 +30,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Menus/UpdateProperties.cs b/src/WebExtensions.Net/Generated/Menus/UpdateProperties.cs index f40b2c3..963e0d3 100644 --- a/src/WebExtensions.Net/Generated/Menus/UpdateProperties.cs +++ b/src/WebExtensions.Net/Generated/Menus/UpdateProperties.cs @@ -13,61 +13,73 @@ namespace WebExtensions.Net.Menus public partial class UpdateProperties : BaseObject { /// + [JsAccessPath("checked")] [JsonPropertyName("checked")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Checked { get; set; } /// + [JsAccessPath("contexts")] [JsonPropertyName("contexts")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Contexts { get; set; } /// + [JsAccessPath("documentUrlPatterns")] [JsonPropertyName("documentUrlPatterns")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable DocumentUrlPatterns { get; set; } /// + [JsAccessPath("enabled")] [JsonPropertyName("enabled")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Enabled { get; set; } /// + [JsAccessPath("icons")] [JsonPropertyName("icons")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public object Icons { get; set; } /// + [JsAccessPath("onclick")] [JsonPropertyName("onclick")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Action Onclick { get; set; } /// Note: You cannot change an item to be a child of one of its own descendants. + [JsAccessPath("parentId")] [JsonPropertyName("parentId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public UpdatePropertiesParentId ParentId { get; set; } /// + [JsAccessPath("targetUrlPatterns")] [JsonPropertyName("targetUrlPatterns")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable TargetUrlPatterns { get; set; } /// + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// + [JsAccessPath("type")] [JsonPropertyName("type")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ItemType? Type { get; set; } /// + [JsAccessPath("viewTypes")] [JsonPropertyName("viewTypes")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable ViewTypes { get; set; } /// Whether the item is visible in the menu. + [JsAccessPath("visible")] [JsonPropertyName("visible")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Visible { get; set; } diff --git a/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs b/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs index 4943bb1..eba62d6 100644 --- a/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs +++ b/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs @@ -1,41 +1,51 @@ +using JsBind.Net; using System.Text.Json; using System.Threading.Tasks; namespace WebExtensions.Net.Notifications { /// + [JsAccessPath("notifications")] public partial interface INotificationsApi { /// Fired when the user pressed a button in the notification. + [JsAccessPath("onButtonClicked")] OnButtonClickedEvent OnButtonClicked { get; } /// Fired when the user clicked in a non-button area of the notification. + [JsAccessPath("onClicked")] OnClickedEvent OnClicked { get; } /// Fired when the notification closed, either by the system or by user action. + [JsAccessPath("onClosed")] OnClosedEvent OnClosed { get; } /// Fired when the notification is shown. + [JsAccessPath("onShown")] OnShownEvent OnShown { get; } /// Clears an existing notification. /// The id of the notification to be updated. /// Indicates whether a matching notification existed. + [JsAccessPath("clear")] ValueTask Clear(string notificationId); /// Creates and displays a notification. /// Contents of the notification. /// The notification id (either supplied or generated) that represents the created notification. + [JsAccessPath("create")] ValueTask Create(NotificationOptions options); /// Creates and displays a notification. /// Identifier of the notification. If it is empty, this method generates an id. If it matches an existing notification, this method first clears that notification before proceeding with the create operation. /// Contents of the notification. /// The notification id (either supplied or generated) that represents the created notification. + [JsAccessPath("create")] ValueTask Create(string notificationId, NotificationOptions options); /// Retrieves all the notifications. /// The set of notifications currently in the system. + [JsAccessPath("getAll")] ValueTask GetAll(); } } diff --git a/src/WebExtensions.Net/Generated/Notifications/NotificationItem.cs b/src/WebExtensions.Net/Generated/Notifications/NotificationItem.cs index eaa63f0..edbdcf4 100644 --- a/src/WebExtensions.Net/Generated/Notifications/NotificationItem.cs +++ b/src/WebExtensions.Net/Generated/Notifications/NotificationItem.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Notifications public partial class NotificationItem : BaseObject { /// Additional details about this item. + [JsAccessPath("message")] [JsonPropertyName("message")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Message { get; set; } /// Title of one item of a list notification. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } diff --git a/src/WebExtensions.Net/Generated/Notifications/NotificationOptions.cs b/src/WebExtensions.Net/Generated/Notifications/NotificationOptions.cs index 9d98125..400d9d4 100644 --- a/src/WebExtensions.Net/Generated/Notifications/NotificationOptions.cs +++ b/src/WebExtensions.Net/Generated/Notifications/NotificationOptions.cs @@ -10,61 +10,73 @@ namespace WebExtensions.Net.Notifications public partial class NotificationOptions : BaseObject { /// A URL to the app icon mask. + [JsAccessPath("appIconMaskUrl")] [JsonPropertyName("appIconMaskUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string AppIconMaskUrl { get; set; } /// Alternate notification content with a lower-weight font. + [JsAccessPath("contextMessage")] [JsonPropertyName("contextMessage")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ContextMessage { get; set; } /// A timestamp associated with the notification, in milliseconds past the epoch. + [JsAccessPath("eventTime")] [JsonPropertyName("eventTime")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public EpochTime? EventTime { get; set; } /// A URL to the sender's avatar, app icon, or a thumbnail for image notifications. + [JsAccessPath("iconUrl")] [JsonPropertyName("iconUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string IconUrl { get; set; } /// A URL to the image thumbnail for image-type notifications. + [JsAccessPath("imageUrl")] [JsonPropertyName("imageUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string ImageUrl { get; set; } /// Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification. + [JsAccessPath("isClickable")] [JsonPropertyName("isClickable")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IsClickable { get; set; } /// Items for multi-item notifications. + [JsAccessPath("items")] [JsonPropertyName("items")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Items { get; set; } /// Main notification content. + [JsAccessPath("message")] [JsonPropertyName("message")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Message { get; set; } /// Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero is default. + [JsAccessPath("priority")] [JsonPropertyName("priority")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Priority { get; set; } /// Current progress ranges from 0 to 100. + [JsAccessPath("progress")] [JsonPropertyName("progress")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Progress { get; set; } /// Title of the notification (e.g. sender name for email). + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Title { get; set; } /// Which type of notification to display. + [JsAccessPath("type")] [JsonPropertyName("type")] public TemplateType Type { get; set; } } diff --git a/src/WebExtensions.Net/Generated/Notifications/OnButtonClickedEvent.cs b/src/WebExtensions.Net/Generated/Notifications/OnButtonClickedEvent.cs index d988fe9..32fe6bb 100644 --- a/src/WebExtensions.Net/Generated/Notifications/OnButtonClickedEvent.cs +++ b/src/WebExtensions.Net/Generated/Notifications/OnButtonClickedEvent.cs @@ -12,6 +12,7 @@ public partial class OnButtonClickedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the user pressed a button in the notification. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Notifications/OnClickedEvent.cs b/src/WebExtensions.Net/Generated/Notifications/OnClickedEvent.cs index 4ecbafc..8528acc 100644 --- a/src/WebExtensions.Net/Generated/Notifications/OnClickedEvent.cs +++ b/src/WebExtensions.Net/Generated/Notifications/OnClickedEvent.cs @@ -12,6 +12,7 @@ public partial class OnClickedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the user clicked in a non-button area of the notification. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Notifications/OnClosedEvent.cs b/src/WebExtensions.Net/Generated/Notifications/OnClosedEvent.cs index 50685ae..3f1ee42 100644 --- a/src/WebExtensions.Net/Generated/Notifications/OnClosedEvent.cs +++ b/src/WebExtensions.Net/Generated/Notifications/OnClosedEvent.cs @@ -12,6 +12,7 @@ public partial class OnClosedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the notification closed, either by the system or by user action. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Notifications/OnShownEvent.cs b/src/WebExtensions.Net/Generated/Notifications/OnShownEvent.cs index 35587e6..20ff537 100644 --- a/src/WebExtensions.Net/Generated/Notifications/OnShownEvent.cs +++ b/src/WebExtensions.Net/Generated/Notifications/OnShownEvent.cs @@ -12,6 +12,7 @@ public partial class OnShownEvent : Event { /// Registers an event listener callback to an event. /// Fired when the notification is shown. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Omnibox/DefaultSuggestResult.cs b/src/WebExtensions.Net/Generated/Omnibox/DefaultSuggestResult.cs index 0912489..40b7909 100644 --- a/src/WebExtensions.Net/Generated/Omnibox/DefaultSuggestResult.cs +++ b/src/WebExtensions.Net/Generated/Omnibox/DefaultSuggestResult.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.Omnibox public partial class DefaultSuggestResult : BaseObject { /// The text that is displayed in the URL dropdown. + [JsAccessPath("description")] [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Description { get; set; } diff --git a/src/WebExtensions.Net/Generated/Omnibox/IOmniboxApi.cs b/src/WebExtensions.Net/Generated/Omnibox/IOmniboxApi.cs index 5e4dfa1..396d3ea 100644 --- a/src/WebExtensions.Net/Generated/Omnibox/IOmniboxApi.cs +++ b/src/WebExtensions.Net/Generated/Omnibox/IOmniboxApi.cs @@ -1,28 +1,36 @@ +using JsBind.Net; using System.Threading.Tasks; using WebExtensions.Net.Events; namespace WebExtensions.Net.Omnibox { /// The omnibox API allows you to register a keyword with Firefox's address bar. + [JsAccessPath("omnibox")] public partial interface IOmniboxApi { /// User has deleted a suggested result. + [JsAccessPath("onDeleteSuggestion")] OnDeleteSuggestionEvent OnDeleteSuggestion { get; } /// User has ended the keyword input session without accepting the input. + [JsAccessPath("onInputCancelled")] Event OnInputCancelled { get; } /// User has changed what is typed into the omnibox. + [JsAccessPath("onInputChanged")] OnInputChangedEvent OnInputChanged { get; } /// User has accepted what is typed into the omnibox. + [JsAccessPath("onInputEntered")] OnInputEnteredEvent OnInputEntered { get; } /// User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events. + [JsAccessPath("onInputStarted")] Event OnInputStarted { get; } /// Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar. /// A partial SuggestResult object, without the 'content' parameter. + [JsAccessPath("setDefaultSuggestion")] ValueTask SetDefaultSuggestion(DefaultSuggestResult suggestion); } } diff --git a/src/WebExtensions.Net/Generated/Omnibox/OnDeleteSuggestionEvent.cs b/src/WebExtensions.Net/Generated/Omnibox/OnDeleteSuggestionEvent.cs index 2f5dd66..78611fb 100644 --- a/src/WebExtensions.Net/Generated/Omnibox/OnDeleteSuggestionEvent.cs +++ b/src/WebExtensions.Net/Generated/Omnibox/OnDeleteSuggestionEvent.cs @@ -12,6 +12,7 @@ public partial class OnDeleteSuggestionEvent : Event { /// Registers an event listener callback to an event. /// User has deleted a suggested result. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Omnibox/OnInputChangedEvent.cs b/src/WebExtensions.Net/Generated/Omnibox/OnInputChangedEvent.cs index 7e84538..db14254 100644 --- a/src/WebExtensions.Net/Generated/Omnibox/OnInputChangedEvent.cs +++ b/src/WebExtensions.Net/Generated/Omnibox/OnInputChangedEvent.cs @@ -13,6 +13,7 @@ public partial class OnInputChangedEvent : Event { /// Registers an event listener callback to an event. /// User has changed what is typed into the omnibox. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action>> callback) { return InvokeVoidAsync("addListener", callback); @@ -21,6 +22,7 @@ public virtual ValueTask AddListener(Action /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action>> callback) { return InvokeAsync("hasListener", callback); @@ -28,6 +30,7 @@ public virtual ValueTask HasListener(ActionDeregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action>> callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Omnibox/OnInputEnteredEvent.cs b/src/WebExtensions.Net/Generated/Omnibox/OnInputEnteredEvent.cs index b10c298..1ef155c 100644 --- a/src/WebExtensions.Net/Generated/Omnibox/OnInputEnteredEvent.cs +++ b/src/WebExtensions.Net/Generated/Omnibox/OnInputEnteredEvent.cs @@ -12,6 +12,7 @@ public partial class OnInputEnteredEvent : Event { /// Registers an event listener callback to an event. /// User has accepted what is typed into the omnibox. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action c /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(ActionDeregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Omnibox/SuggestResult.cs b/src/WebExtensions.Net/Generated/Omnibox/SuggestResult.cs index 671b25d..63601e7 100644 --- a/src/WebExtensions.Net/Generated/Omnibox/SuggestResult.cs +++ b/src/WebExtensions.Net/Generated/Omnibox/SuggestResult.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.Omnibox public partial class SuggestResult : BaseObject { /// The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry. + [JsAccessPath("content")] [JsonPropertyName("content")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Content { get; set; } /// Whether the suggest result can be deleted by the user. + [JsAccessPath("deletable")] [JsonPropertyName("deletable")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Deletable { get; set; } /// The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. 'dim''match'dimmed match'/match''/dim'. You must escape the five predefined entities to display them as text: stackoverflow.com/a/1091953/89484 + [JsAccessPath("description")] [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Description { get; set; } diff --git a/src/WebExtensions.Net/Generated/PageAction/GetPopupDetails.cs b/src/WebExtensions.Net/Generated/PageAction/GetPopupDetails.cs index 70d6ff3..47a1a29 100644 --- a/src/WebExtensions.Net/Generated/PageAction/GetPopupDetails.cs +++ b/src/WebExtensions.Net/Generated/PageAction/GetPopupDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.PageAction public partial class GetPopupDetails : BaseObject { /// Specify the tab to get the popup from. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] public int TabId { get; set; } } diff --git a/src/WebExtensions.Net/Generated/PageAction/GetTitleDetails.cs b/src/WebExtensions.Net/Generated/PageAction/GetTitleDetails.cs index 83f9797..439e211 100644 --- a/src/WebExtensions.Net/Generated/PageAction/GetTitleDetails.cs +++ b/src/WebExtensions.Net/Generated/PageAction/GetTitleDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.PageAction public partial class GetTitleDetails : BaseObject { /// Specify the tab to get the title from. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] public int TabId { get; set; } } diff --git a/src/WebExtensions.Net/Generated/PageAction/IPageActionApi.cs b/src/WebExtensions.Net/Generated/PageAction/IPageActionApi.cs index f1e0702..f4b428f 100644 --- a/src/WebExtensions.Net/Generated/PageAction/IPageActionApi.cs +++ b/src/WebExtensions.Net/Generated/PageAction/IPageActionApi.cs @@ -1,48 +1,60 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.PageAction { /// Use the browser.pageAction API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages. + [JsAccessPath("pageAction")] public partial interface IPageActionApi { /// Fired when a page action icon is clicked. This event will not fire if the page action has a popup. + [JsAccessPath("onClicked")] OnClickedEvent OnClicked { get; } /// Gets the html document set as the popup for this page action. /// /// + [JsAccessPath("getPopup")] ValueTask GetPopup(GetPopupDetails details); /// Gets the title of the page action. /// /// + [JsAccessPath("getTitle")] ValueTask GetTitle(GetTitleDetails details); /// Hides the page action. /// The id of the tab for which you want to modify the page action. + [JsAccessPath("hide")] ValueTask Hide(int tabId); /// Checks whether the page action is shown. /// + [JsAccessPath("isShown")] ValueTask IsShown(IsShownDetails details); /// Opens the extension page action in the active window. + [JsAccessPath("openPopup")] ValueTask OpenPopup(); /// Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the 'b'path'/b' or the 'b'imageData'/b' property must be specified. /// + [JsAccessPath("setIcon")] ValueTask SetIcon(SetIconDetails details); /// Sets the html document to be opened as a popup when the user clicks on the page action's icon. /// + [JsAccessPath("setPopup")] ValueTask SetPopup(SetPopupDetails details); /// Sets the title of the page action. This is displayed in a tooltip over the page action. /// + [JsAccessPath("setTitle")] ValueTask SetTitle(SetTitleDetails details); /// Shows the page action. The page action is shown whenever the tab is selected. /// The id of the tab for which you want to modify the page action. + [JsAccessPath("show")] ValueTask Show(int tabId); } } diff --git a/src/WebExtensions.Net/Generated/PageAction/IsShownDetails.cs b/src/WebExtensions.Net/Generated/PageAction/IsShownDetails.cs index a60c309..638b86d 100644 --- a/src/WebExtensions.Net/Generated/PageAction/IsShownDetails.cs +++ b/src/WebExtensions.Net/Generated/PageAction/IsShownDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.PageAction public partial class IsShownDetails : BaseObject { /// Specify the tab to get the shownness from. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] public int TabId { get; set; } } diff --git a/src/WebExtensions.Net/Generated/PageAction/OnClickData.cs b/src/WebExtensions.Net/Generated/PageAction/OnClickData.cs index ff22704..3e6bd25 100644 --- a/src/WebExtensions.Net/Generated/PageAction/OnClickData.cs +++ b/src/WebExtensions.Net/Generated/PageAction/OnClickData.cs @@ -10,11 +10,13 @@ namespace WebExtensions.Net.PageAction public partial class OnClickData : BaseObject { /// An integer value of button by which menu item was clicked. + [JsAccessPath("button")] [JsonPropertyName("button")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Button { get; set; } /// An array of keyboard modifiers that were held while the menu item was clicked. + [JsAccessPath("modifiers")] [JsonPropertyName("modifiers")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Modifiers { get; set; } diff --git a/src/WebExtensions.Net/Generated/PageAction/OnClickedEvent.cs b/src/WebExtensions.Net/Generated/PageAction/OnClickedEvent.cs index c8e4a8b..0764492 100644 --- a/src/WebExtensions.Net/Generated/PageAction/OnClickedEvent.cs +++ b/src/WebExtensions.Net/Generated/PageAction/OnClickedEvent.cs @@ -13,6 +13,7 @@ public partial class OnClickedEvent : Event { /// Registers an event listener callback to an event. /// Fired when a page action icon is clicked. This event will not fire if the page action has a popup. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -21,6 +22,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -28,6 +30,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/PageAction/SetIconDetails.cs b/src/WebExtensions.Net/Generated/PageAction/SetIconDetails.cs index 40b0a23..c2ad911 100644 --- a/src/WebExtensions.Net/Generated/PageAction/SetIconDetails.cs +++ b/src/WebExtensions.Net/Generated/PageAction/SetIconDetails.cs @@ -9,16 +9,19 @@ namespace WebExtensions.Net.PageAction public partial class SetIconDetails : BaseObject { /// Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' + [JsAccessPath("imageData")] [JsonPropertyName("imageData")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ImageData ImageData { get; set; } /// Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' + [JsAccessPath("path")] [JsonPropertyName("path")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Path Path { get; set; } /// The id of the tab for which you want to modify the page action. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] public int TabId { get; set; } } diff --git a/src/WebExtensions.Net/Generated/PageAction/SetPopupDetails.cs b/src/WebExtensions.Net/Generated/PageAction/SetPopupDetails.cs index 6bac4ae..6759b33 100644 --- a/src/WebExtensions.Net/Generated/PageAction/SetPopupDetails.cs +++ b/src/WebExtensions.Net/Generated/PageAction/SetPopupDetails.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.PageAction public partial class SetPopupDetails : BaseObject { /// The html file to show in a popup. If set to the empty string (''), no popup is shown. + [JsAccessPath("popup")] [JsonPropertyName("popup")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Popup Popup { get; set; } /// The id of the tab for which you want to modify the page action. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] public int TabId { get; set; } } diff --git a/src/WebExtensions.Net/Generated/PageAction/SetTitleDetails.cs b/src/WebExtensions.Net/Generated/PageAction/SetTitleDetails.cs index d4b6bf3..13add37 100644 --- a/src/WebExtensions.Net/Generated/PageAction/SetTitleDetails.cs +++ b/src/WebExtensions.Net/Generated/PageAction/SetTitleDetails.cs @@ -9,10 +9,12 @@ namespace WebExtensions.Net.PageAction public partial class SetTitleDetails : BaseObject { /// The id of the tab for which you want to modify the page action. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] public int TabId { get; set; } /// The tooltip string. + [JsAccessPath("title")] [JsonPropertyName("title")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Title Title { get; set; } diff --git a/src/WebExtensions.Net/Generated/Permissions/AnyPermissions.cs b/src/WebExtensions.Net/Generated/Permissions/AnyPermissions.cs index 5331a60..7cf8d10 100644 --- a/src/WebExtensions.Net/Generated/Permissions/AnyPermissions.cs +++ b/src/WebExtensions.Net/Generated/Permissions/AnyPermissions.cs @@ -11,11 +11,13 @@ namespace WebExtensions.Net.Permissions public partial class AnyPermissions : BaseObject { /// + [JsAccessPath("origins")] [JsonPropertyName("origins")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Origins { get; set; } /// + [JsAccessPath("permissions")] [JsonPropertyName("permissions")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Permissions { get; set; } diff --git a/src/WebExtensions.Net/Generated/Permissions/IPermissionsApi.cs b/src/WebExtensions.Net/Generated/Permissions/IPermissionsApi.cs index 55cb8ea..2a5d5ea 100644 --- a/src/WebExtensions.Net/Generated/Permissions/IPermissionsApi.cs +++ b/src/WebExtensions.Net/Generated/Permissions/IPermissionsApi.cs @@ -1,32 +1,40 @@ +using JsBind.Net; using System.Threading.Tasks; namespace WebExtensions.Net.Permissions { /// + [JsAccessPath("permissions")] public partial interface IPermissionsApi { /// Fired when the extension acquires new permissions. + [JsAccessPath("onAdded")] OnAddedEvent OnAdded { get; } /// Fired when permissions are removed from the extension. + [JsAccessPath("onRemoved")] OnRemovedEvent OnRemoved { get; } /// Check if the extension has the given permissions. /// /// + [JsAccessPath("contains")] ValueTask Contains(AnyPermissions permissions); /// Get a list of all the extension's permissions. /// + [JsAccessPath("getAll")] ValueTask GetAll(); /// Relinquish the given permissions. /// + [JsAccessPath("remove")] ValueTask Remove(PermissionsType permissions); /// Request the given permissions. /// /// + [JsAccessPath("request")] ValueTask Request(PermissionsType permissions); } } diff --git a/src/WebExtensions.Net/Generated/Permissions/OnAddedEvent.cs b/src/WebExtensions.Net/Generated/Permissions/OnAddedEvent.cs index 54f6e85..afd3323 100644 --- a/src/WebExtensions.Net/Generated/Permissions/OnAddedEvent.cs +++ b/src/WebExtensions.Net/Generated/Permissions/OnAddedEvent.cs @@ -12,6 +12,7 @@ public partial class OnAddedEvent : Event { /// Registers an event listener callback to an event. /// Fired when the extension acquires new permissions. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Permissions/OnRemovedEvent.cs b/src/WebExtensions.Net/Generated/Permissions/OnRemovedEvent.cs index 33b1980..fe1aab1 100644 --- a/src/WebExtensions.Net/Generated/Permissions/OnRemovedEvent.cs +++ b/src/WebExtensions.Net/Generated/Permissions/OnRemovedEvent.cs @@ -12,6 +12,7 @@ public partial class OnRemovedEvent : Event { /// Registers an event listener callback to an event. /// Fired when permissions are removed from the extension. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Permissions/PermissionsType.cs b/src/WebExtensions.Net/Generated/Permissions/PermissionsType.cs index c462654..f3f3312 100644 --- a/src/WebExtensions.Net/Generated/Permissions/PermissionsType.cs +++ b/src/WebExtensions.Net/Generated/Permissions/PermissionsType.cs @@ -11,11 +11,13 @@ namespace WebExtensions.Net.Permissions public partial class PermissionsType : BaseObject { /// + [JsAccessPath("origins")] [JsonPropertyName("origins")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Origins { get; set; } /// + [JsAccessPath("permissions")] [JsonPropertyName("permissions")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Permissions { get; set; } diff --git a/src/WebExtensions.Net/Generated/Privacy/IPrivacyApi.cs b/src/WebExtensions.Net/Generated/Privacy/IPrivacyApi.cs index 2b034fe..1c254fb 100644 --- a/src/WebExtensions.Net/Generated/Privacy/IPrivacyApi.cs +++ b/src/WebExtensions.Net/Generated/Privacy/IPrivacyApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using WebExtensions.Net.Privacy.Network; using WebExtensions.Net.Privacy.Services; using WebExtensions.Net.Privacy.Websites; @@ -5,15 +6,19 @@ namespace WebExtensions.Net.Privacy { /// + [JsAccessPath("privacy")] public partial interface IPrivacyApi { /// Use the browser.privacy API to control usage of the features in the browser that can affect a user's privacy.
Requires manifest permission privacy.
+ [JsAccessPath("network")] INetworkApi Network { get; } /// Use the browser.privacy API to control usage of the features in the browser that can affect a user's privacy.
Requires manifest permission privacy.
+ [JsAccessPath("services")] IServicesApi Services { get; } /// Use the browser.privacy API to control usage of the features in the browser that can affect a user's privacy.
Requires manifest permission privacy.
+ [JsAccessPath("websites")] IWebsitesApi Websites { get; } } } diff --git a/src/WebExtensions.Net/Generated/Privacy/Network/INetworkApi.cs b/src/WebExtensions.Net/Generated/Privacy/Network/INetworkApi.cs index c993245..b341b22 100644 --- a/src/WebExtensions.Net/Generated/Privacy/Network/INetworkApi.cs +++ b/src/WebExtensions.Net/Generated/Privacy/Network/INetworkApi.cs @@ -1,26 +1,34 @@ +using JsBind.Net; using WebExtensions.Net.Types; namespace WebExtensions.Net.Privacy.Network { /// Use the browser.privacy API to control usage of the features in the browser that can affect a user's privacy. + [JsAccessPath("network")] public partial interface INetworkApi { /// Allow users to query the status of 'Global Privacy Control'. This setting's value is of type boolean, defaulting to false. + [JsAccessPath("globalPrivacyControl")] Setting GlobalPrivacyControl { get; } /// Allow users to query the mode for 'HTTPS-Only Mode'. This setting's value is of type HTTPSOnlyModeOption, defaulting to never. + [JsAccessPath("httpsOnlyMode")] Setting HttpsOnlyMode { get; } /// If enabled, the browser attempts to speed up your web browsing experience by pre-resolving DNS entries, prerendering sites (<link rel='prefetch' ...>), and preemptively opening TCP and SSL connections to servers. This preference's value is a boolean, defaulting to true. + [JsAccessPath("networkPredictionEnabled")] Setting NetworkPredictionEnabled { get; } /// Allow users to enable and disable RTCPeerConnections (aka WebRTC). + [JsAccessPath("peerConnectionEnabled")] Setting PeerConnectionEnabled { get; } /// This property controls the minimum and maximum TLS versions. This setting's value is an object of $(ref:tlsVersionRestrictionConfig). + [JsAccessPath("tlsVersionRestriction")] Setting TlsVersionRestriction { get; } /// Allow users to specify the media performance/privacy tradeoffs which impacts how WebRTC traffic will be routed and how much local address information is exposed. This preference's value is of type IPHandlingPolicy, defaulting to default. + [JsAccessPath("webRTCIPHandlingPolicy")] Setting WebRTCIPHandlingPolicy { get; } } } diff --git a/src/WebExtensions.Net/Generated/Privacy/Services/IServicesApi.cs b/src/WebExtensions.Net/Generated/Privacy/Services/IServicesApi.cs index 27d602f..98a9b42 100644 --- a/src/WebExtensions.Net/Generated/Privacy/Services/IServicesApi.cs +++ b/src/WebExtensions.Net/Generated/Privacy/Services/IServicesApi.cs @@ -1,11 +1,14 @@ +using JsBind.Net; using WebExtensions.Net.Types; namespace WebExtensions.Net.Privacy.Services { /// Use the browser.privacy API to control usage of the features in the browser that can affect a user's privacy. + [JsAccessPath("services")] public partial interface IServicesApi { /// If enabled, the password manager will ask if you want to save passwords. This preference's value is a boolean, defaulting to true. + [JsAccessPath("passwordSavingEnabled")] Setting PasswordSavingEnabled { get; } } } diff --git a/src/WebExtensions.Net/Generated/Privacy/Websites/IWebsitesApi.cs b/src/WebExtensions.Net/Generated/Privacy/Websites/IWebsitesApi.cs index f2515df..67c4836 100644 --- a/src/WebExtensions.Net/Generated/Privacy/Websites/IWebsitesApi.cs +++ b/src/WebExtensions.Net/Generated/Privacy/Websites/IWebsitesApi.cs @@ -1,26 +1,34 @@ +using JsBind.Net; using WebExtensions.Net.Types; namespace WebExtensions.Net.Privacy.Websites { /// Use the browser.privacy API to control usage of the features in the browser that can affect a user's privacy. + [JsAccessPath("websites")] public partial interface IWebsitesApi { /// Allow users to specify the default settings for allowing cookies, as well as whether all cookies should be created as non-persistent cookies. This setting's value is of type CookieConfig. + [JsAccessPath("cookieConfig")] Setting CookieConfig { get; } /// If enabled, the browser will associate all data (including cookies, HSTS data, cached images, and more) for any third party domains with the domain in the address bar. This prevents third party trackers from using directly stored information to identify you across different websites, but may break websites where you login with a third party account (such as a Facebook or Google login.) The value of this preference is of type boolean, and the default value is false. + [JsAccessPath("firstPartyIsolate")] Setting FirstPartyIsolate { get; } /// If enabled, the browser sends auditing pings when requested by a website (<a ping>). The value of this preference is of type boolean, and the default value is true. + [JsAccessPath("hyperlinkAuditingEnabled")] Setting HyperlinkAuditingEnabled { get; } /// If enabled, the browser sends referer headers with your requests. Yes, the name of this preference doesn't match the misspelled header. No, we're not going to change it. The value of this preference is of type boolean, and the default value is true. + [JsAccessPath("referrersEnabled")] Setting ReferrersEnabled { get; } /// If enabled, the browser attempts to appear similar to other users by reporting generic information to websites. This can prevent websites from uniquely identifying users. Examples of data that is spoofed include number of CPU cores, precision of JavaScript timers, the local timezone, and disabling features such as GamePad support, and the WebSpeech and Navigator APIs. The value of this preference is of type boolean, and the default value is false. + [JsAccessPath("resistFingerprinting")] Setting ResistFingerprinting { get; } /// Allow users to specify the mode for tracking protection. This setting's value is of type TrackingProtectionModeOption, defaulting to private_browsing_only. + [JsAccessPath("trackingProtectionMode")] Setting TrackingProtectionMode { get; } } } diff --git a/src/WebExtensions.Net/Generated/Proxy/Details.cs b/src/WebExtensions.Net/Generated/Proxy/Details.cs index e8c7f78..2c3eb42 100644 --- a/src/WebExtensions.Net/Generated/Proxy/Details.cs +++ b/src/WebExtensions.Net/Generated/Proxy/Details.cs @@ -10,74 +10,90 @@ namespace WebExtensions.Net.Proxy public partial class Details : BaseObject { /// The cookie store ID of the contextual identity. + [JsAccessPath("cookieStoreId")] [JsonPropertyName("cookieStoreId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string CookieStoreId { get; set; } /// URL of the page into which the requested resource will be loaded. + [JsAccessPath("documentUrl")] [JsonPropertyName("documentUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string DocumentUrl { get; set; } /// The value 0 indicates that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (type is main_frame or sub_frame), frameId indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. + [JsAccessPath("frameId")] [JsonPropertyName("frameId")] public int FrameId { get; set; } /// Indicates if this response was fetched from disk cache. + [JsAccessPath("fromCache")] [JsonPropertyName("fromCache")] public bool FromCache { get; set; } /// True for private browsing requests. + [JsAccessPath("incognito")] [JsonPropertyName("incognito")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Incognito { get; set; } /// Standard HTTP method. + [JsAccessPath("method")] [JsonPropertyName("method")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Method { get; set; } /// URL of the resource that triggered this request. + [JsAccessPath("originUrl")] [JsonPropertyName("originUrl")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string OriginUrl { get; set; } /// ID of frame that wraps the frame which sent the request. Set to -1 if no parent frame exists. + [JsAccessPath("parentFrameId")] [JsonPropertyName("parentFrameId")] public int ParentFrameId { get; set; } /// The HTTP request headers that are going to be sent out with this request. + [JsAccessPath("requestHeaders")] [JsonPropertyName("requestHeaders")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public HttpHeaders RequestHeaders { get; set; } /// The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request. + [JsAccessPath("requestId")] [JsonPropertyName("requestId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string RequestId { get; set; } /// The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab. + [JsAccessPath("tabId")] [JsonPropertyName("tabId")] public int TabId { get; set; } /// Indicates if this request and its content window hierarchy is third party. + [JsAccessPath("thirdParty")] [JsonPropertyName("thirdParty")] public bool ThirdParty { get; set; } /// The time when this signal is triggered, in milliseconds since the epoch. + [JsAccessPath("timeStamp")] [JsonPropertyName("timeStamp")] public EpochTime TimeStamp { get; set; } /// How the requested resource will be used. + [JsAccessPath("type")] [JsonPropertyName("type")] public ResourceType Type { get; set; } /// + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } /// Url classification if the request has been classified. + [JsAccessPath("urlClassification")] [JsonPropertyName("urlClassification")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public UrlClassification UrlClassification { get; set; } diff --git a/src/WebExtensions.Net/Generated/Proxy/IProxyApi.cs b/src/WebExtensions.Net/Generated/Proxy/IProxyApi.cs index 3a3b128..0d8245d 100644 --- a/src/WebExtensions.Net/Generated/Proxy/IProxyApi.cs +++ b/src/WebExtensions.Net/Generated/Proxy/IProxyApi.cs @@ -1,17 +1,22 @@ +using JsBind.Net; using WebExtensions.Net.Types; namespace WebExtensions.Net.Proxy { /// Provides access to global proxy settings for Firefox and proxy event listeners to handle dynamic proxy implementations. + [JsAccessPath("proxy")] public partial interface IProxyApi { /// Notifies about errors caused by the invalid use of the proxy API. + [JsAccessPath("onError")] OnErrorEvent OnError { get; } /// Fired when proxy data is needed for a request. + [JsAccessPath("onRequest")] OnRequestEvent OnRequest { get; } /// Configures proxy settings. This setting's value is an object of type ProxyConfig. + [JsAccessPath("settings")] Setting Settings { get; } } } diff --git a/src/WebExtensions.Net/Generated/Proxy/OnErrorEvent.cs b/src/WebExtensions.Net/Generated/Proxy/OnErrorEvent.cs index 0c297ef..d78cdcf 100644 --- a/src/WebExtensions.Net/Generated/Proxy/OnErrorEvent.cs +++ b/src/WebExtensions.Net/Generated/Proxy/OnErrorEvent.cs @@ -12,6 +12,7 @@ public partial class OnErrorEvent : Event { /// Registers an event listener callback to an event. /// Notifies about errors caused by the invalid use of the proxy API. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Proxy/OnRequestEvent.cs b/src/WebExtensions.Net/Generated/Proxy/OnRequestEvent.cs index 0d770cb..df176f2 100644 --- a/src/WebExtensions.Net/Generated/Proxy/OnRequestEvent.cs +++ b/src/WebExtensions.Net/Generated/Proxy/OnRequestEvent.cs @@ -14,6 +14,7 @@ public partial class OnRequestEvent : Event { /// Registers an event listener callback to an event. /// Fired when proxy data is needed for a request. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action
callback) { return InvokeVoidAsync("addListener", callback); @@ -23,6 +24,7 @@ public virtual ValueTask AddListener(Action
callback) /// Fired when proxy data is needed for a request. /// A set of filters that restricts the events that will be sent to this listener. /// Array of extra information that should be passed to the listener function. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action
callback, RequestFilter filter, IEnumerable extraInfoSpec) { return InvokeVoidAsync("addListener", callback, filter, extraInfoSpec); @@ -31,6 +33,7 @@ public virtual ValueTask AddListener(Action
callback, RequestFilter fil /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action
callback) { return InvokeAsync("hasListener", callback); @@ -41,6 +44,7 @@ public virtual ValueTask HasListener(Action
callback) /// A set of filters that restricts the events that will be sent to this listener. /// Array of extra information that should be passed to the listener function. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action
callback, RequestFilter filter, IEnumerable extraInfoSpec) { return InvokeAsync("hasListener", callback, filter, extraInfoSpec); @@ -48,6 +52,7 @@ public virtual ValueTask HasListener(Action
callback, RequestFilt /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action
callback) { return InvokeVoidAsync("removeListener", callback); @@ -57,6 +62,7 @@ public virtual ValueTask RemoveListener(Action
callback) /// Listener that shall be unregistered. /// A set of filters that restricts the events that will be sent to this listener. /// Array of extra information that should be passed to the listener function. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action
callback, RequestFilter filter, IEnumerable extraInfoSpec) { return InvokeVoidAsync("removeListener", callback, filter, extraInfoSpec); diff --git a/src/WebExtensions.Net/Generated/Runtime/BrowserInfo.cs b/src/WebExtensions.Net/Generated/Runtime/BrowserInfo.cs index 6dd60a4..1987871 100644 --- a/src/WebExtensions.Net/Generated/Runtime/BrowserInfo.cs +++ b/src/WebExtensions.Net/Generated/Runtime/BrowserInfo.cs @@ -9,21 +9,25 @@ namespace WebExtensions.Net.Runtime public partial class BrowserInfo : BaseObject { /// The browser's build ID/date, for example '20160101'. + [JsAccessPath("buildID")] [JsonPropertyName("buildID")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string BuildID { get; set; } /// The name of the browser, for example 'Firefox'. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// The name of the browser vendor, for example 'Mozilla'. + [JsAccessPath("vendor")] [JsonPropertyName("vendor")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Vendor { get; set; } /// The browser's version, for example '42.0.0' or '0.8.1pre'. + [JsAccessPath("version")] [JsonPropertyName("version")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Version { get; set; } diff --git a/src/WebExtensions.Net/Generated/Runtime/ConnectInfo.cs b/src/WebExtensions.Net/Generated/Runtime/ConnectInfo.cs index c67d1de..dd482d6 100644 --- a/src/WebExtensions.Net/Generated/Runtime/ConnectInfo.cs +++ b/src/WebExtensions.Net/Generated/Runtime/ConnectInfo.cs @@ -9,11 +9,13 @@ namespace WebExtensions.Net.Runtime public partial class ConnectInfo : BaseObject { /// Whether the TLS channel ID will be passed into onConnectExternal for processes that are listening for the connection event. + [JsAccessPath("includeTlsChannelId")] [JsonPropertyName("includeTlsChannelId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? IncludeTlsChannelId { get; set; } /// Will be passed into onConnect for processes that are listening for the connection event. + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } diff --git a/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs b/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs index af92df5..c04bb7f 100644 --- a/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs +++ b/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs @@ -1,3 +1,4 @@ +using JsBind.Net; using System.Text.Json; using System.Threading.Tasks; using WebExtensions.Net.Events; @@ -5,88 +6,111 @@ namespace WebExtensions.Net.Runtime { /// Use the browser.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs. + [JsAccessPath("runtime")] public partial interface IRuntimeApi { /// The ID of the extension/app. + [JsAccessPath("id")] string Id { get; } /// This will be defined during an API method callback if there was an error + [JsAccessPath("lastError")] LastError LastError { get; } /// Fired when a connection is made from either an extension process or a content script. + [JsAccessPath("onConnect")] OnConnectEvent OnConnect { get; } /// Fired when a connection is made from another extension. + [JsAccessPath("onConnectExternal")] OnConnectExternalEvent OnConnectExternal { get; } /// Fired when the extension is first installed, when the extension is updated to a new version, and when the browser is updated to a new version. + [JsAccessPath("onInstalled")] OnInstalledEvent OnInstalled { get; } /// Fired when a message is sent from either an extension process or a content script. + [JsAccessPath("onMessage")] OnMessageEvent OnMessage { get; } /// Fired when a message is sent from another extension/app. Cannot be used in a content script. + [JsAccessPath("onMessageExternal")] OnMessageExternalEvent OnMessageExternal { get; } /// Fired when a profile that has this extension installed first starts up. This event is not fired for incognito profiles. + [JsAccessPath("onStartup")] Event OnStartup { get; } /// Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. + [JsAccessPath("onSuspend")] Event OnSuspend { get; } /// Sent after onSuspend to indicate that the app won't be unloaded after all. + [JsAccessPath("onSuspendCanceled")] Event OnSuspendCanceled { get; } /// Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call $(ref:runtime.reload). If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call $(ref:runtime.reload) manually in response to this event the update will not get installed until the next time the browser itself restarts. If no handlers are listening for this event, and your extension has a persistent background page, it behaves as if $(ref:runtime.reload) is called in response to this event. + [JsAccessPath("onUpdateAvailable")] OnUpdateAvailableEvent OnUpdateAvailable { get; } /// Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and $(topic:manifest/externally_connectable)[web messaging]. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via $(ref:tabs.connect). /// The ID of the extension or app to connect to. If omitted, a connection will be attempted with your own extension. Required if sending messages from a web page for $(topic:manifest/externally_connectable)[web messaging]. /// /// Port through which messages can be sent and received. The port's $(ref:runtime.Port onDisconnect) event is fired if the extension/app does not exist. + [JsAccessPath("connect")] ValueTask Connect(string extensionId = null, ConnectInfo connectInfo = null); /// Connects to a native application in the host machine. /// The name of the registered application to connect to. /// Port through which messages can be sent and received with the application + [JsAccessPath("connectNative")] ValueTask ConnectNative(string application); /// Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set. /// The JavaScript 'window' object for the background page. + [JsAccessPath("getBackgroundPage")] ValueTask GetBackgroundPage(); /// Returns information about the current browser. /// + [JsAccessPath("getBrowserInfo")] ValueTask GetBrowserInfo(); /// Get the frameId of any window global or frame element. /// A WindowProxy or a Browsing Context container element (IFrame, Frame, Embed, Object) for the target frame. /// The frameId of the target frame, or -1 if it doesn't exist. + [JsAccessPath("getFrameId")] ValueTask GetFrameId(object target); /// Returns details about the app or extension from the manifest. The object returned is a serialization of the full $(topic:manifest)[manifest file]. /// The manifest details. + [JsAccessPath("getManifest")] ValueTask GetManifest(); /// Returns information about the current platform. /// + [JsAccessPath("getPlatformInfo")] ValueTask GetPlatformInfo(); /// Converts a relative path within an app/extension install directory to a fully-qualified URL. /// A path to a resource within an app/extension expressed relative to its install directory. /// The fully-qualified URL to the resource. + [JsAccessPath("getURL")] ValueTask GetURL(string path); /// Open your Extension's options page, if possible.
The precise behavior may depend on your manifest's $(topic:optionsV2)[options_ui] or $(topic:options)[options_page] key, or what the browser happens to support at the time.
If your Extension does not declare an options page, or the browser failed to create one for some other reason, the callback will set $(ref:lastError).
+ [JsAccessPath("openOptionsPage")] ValueTask OpenOptionsPage(); /// Reloads the app or extension. + [JsAccessPath("reload")] ValueTask Reload(); /// Sends a single message to event listeners within your extension/app or a different extension/app. Similar to $(ref:runtime.connect) but only sends a single message, with an optional response. If sending to your extension, the $(ref:runtime.onMessage) event will be fired in each page, or $(ref:runtime.onMessageExternal), if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use $(ref:tabs.sendMessage). /// /// /// The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message. + [JsAccessPath("sendMessage")] ValueTask SendMessage(object message, object options = null); /// Sends a single message to event listeners within your extension/app or a different extension/app. Similar to $(ref:runtime.connect) but only sends a single message, with an optional response. If sending to your extension, the $(ref:runtime.onMessage) event will be fired in each page, or $(ref:runtime.onMessageExternal), if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use $(ref:tabs.sendMessage). @@ -94,16 +118,19 @@ public partial interface IRuntimeApi /// /// /// The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message. + [JsAccessPath("sendMessage")] ValueTask SendMessage(string extensionId, object message, object options = null); /// Send a single message to a native application. /// The name of the native messaging host. /// The message that will be passed to the native messaging host. /// The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message. + [JsAccessPath("sendNativeMessage")] ValueTask SendNativeMessage(string application, object message); /// Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 1023 characters. /// URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation. + [JsAccessPath("setUninstallURL")] ValueTask SetUninstallURL(string url = null); } } diff --git a/src/WebExtensions.Net/Generated/Runtime/LastError.cs b/src/WebExtensions.Net/Generated/Runtime/LastError.cs index 4bde289..84c3805 100644 --- a/src/WebExtensions.Net/Generated/Runtime/LastError.cs +++ b/src/WebExtensions.Net/Generated/Runtime/LastError.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.Runtime public partial class LastError : BaseObject { /// Details about the error which occurred. + [JsAccessPath("message")] [JsonPropertyName("message")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Message { get; set; } diff --git a/src/WebExtensions.Net/Generated/Runtime/MessageSender.cs b/src/WebExtensions.Net/Generated/Runtime/MessageSender.cs index b160448..385f4e8 100644 --- a/src/WebExtensions.Net/Generated/Runtime/MessageSender.cs +++ b/src/WebExtensions.Net/Generated/Runtime/MessageSender.cs @@ -10,21 +10,25 @@ namespace WebExtensions.Net.Runtime public partial class MessageSender : BaseObject { /// The $(topic:frame_ids)[frame] that opened the connection. 0 for top-level frames, positive for child frames. This will only be set when tab is set. + [JsAccessPath("frameId")] [JsonPropertyName("frameId")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? FrameId { get; set; } /// The ID of the extension or app that opened the connection, if any. + [JsAccessPath("id")] [JsonPropertyName("id")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Id { get; set; } /// The $(ref:tabs.Tab) which opened the connection, if any. This property will 'strong'only'/strong' be present when the connection was opened from a tab (including content scripts), and 'strong'only'/strong' if the receiver is an extension, not an app. + [JsAccessPath("tab")] [JsonPropertyName("tab")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Tab Tab { get; set; } /// The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it. + [JsAccessPath("url")] [JsonPropertyName("url")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Url { get; set; } diff --git a/src/WebExtensions.Net/Generated/Runtime/OnConnectEvent.cs b/src/WebExtensions.Net/Generated/Runtime/OnConnectEvent.cs index c037900..c804ac2 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnConnectEvent.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnConnectEvent.cs @@ -12,6 +12,7 @@ public partial class OnConnectEvent : Event { /// Registers an event listener callback to an event. /// Fired when a connection is made from either an extension process or a content script. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Runtime/OnConnectExternalEvent.cs b/src/WebExtensions.Net/Generated/Runtime/OnConnectExternalEvent.cs index f964b30..5cfe228 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnConnectExternalEvent.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnConnectExternalEvent.cs @@ -12,6 +12,7 @@ public partial class OnConnectExternalEvent : Event { /// Registers an event listener callback to an event. /// Fired when a connection is made from another extension. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action callback) /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(Action callback) /// Deregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Runtime/OnInstalledEvent.cs b/src/WebExtensions.Net/Generated/Runtime/OnInstalledEvent.cs index 8443177..11a9337 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnInstalledEvent.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnInstalledEvent.cs @@ -12,6 +12,7 @@ public partial class OnInstalledEvent : Event { /// Registers an event listener callback to an event. /// Fired when the extension is first installed, when the extension is updated to a new version, and when the browser is updated to a new version. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action cal /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(ActionDeregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Runtime/OnInstalledEventCallbackDetails.cs b/src/WebExtensions.Net/Generated/Runtime/OnInstalledEventCallbackDetails.cs index e4d6d3f..1dc4db6 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnInstalledEventCallbackDetails.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnInstalledEventCallbackDetails.cs @@ -9,15 +9,18 @@ namespace WebExtensions.Net.Runtime public partial class OnInstalledEventCallbackDetails : BaseObject { /// Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. + [JsAccessPath("previousVersion")] [JsonPropertyName("previousVersion")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string PreviousVersion { get; set; } /// The reason that this event is being dispatched. + [JsAccessPath("reason")] [JsonPropertyName("reason")] public OnInstalledReason Reason { get; set; } /// Indicates whether the addon is installed as a temporary extension. + [JsAccessPath("temporary")] [JsonPropertyName("temporary")] public bool Temporary { get; set; } } diff --git a/src/WebExtensions.Net/Generated/Runtime/OnMessageEvent.cs b/src/WebExtensions.Net/Generated/Runtime/OnMessageEvent.cs index da9fe57..91a7f26 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnMessageEvent.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnMessageEvent.cs @@ -12,6 +12,7 @@ public partial class OnMessageEvent : Event { /// Registers an event listener callback to an event. /// Fired when a message is sent from either an extension process or a content script. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Func callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Func c /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Func callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(FuncDeregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Func callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Runtime/OnMessageExternalEvent.cs b/src/WebExtensions.Net/Generated/Runtime/OnMessageExternalEvent.cs index 83f0582..4b20172 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnMessageExternalEvent.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnMessageExternalEvent.cs @@ -12,6 +12,7 @@ public partial class OnMessageExternalEvent : Event { /// Registers an event listener callback to an event. /// Fired when a message is sent from another extension/app. Cannot be used in a content script. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Func callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Func c /// /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Func callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(FuncDeregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Func callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEvent.cs b/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEvent.cs index a2a5260..2bbca08 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEvent.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEvent.cs @@ -12,6 +12,7 @@ public partial class OnUpdateAvailableEvent : Event { /// Registers an event listener callback to an event. /// Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call $(ref:runtime.reload). If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call $(ref:runtime.reload) manually in response to this event the update will not get installed until the next time the browser itself restarts. If no handlers are listening for this event, and your extension has a persistent background page, it behaves as if $(ref:runtime.reload) is called in response to this event. + [JsAccessPath("addListener")] public virtual ValueTask AddListener(Action callback) { return InvokeVoidAsync("addListener", callback); @@ -20,6 +21,7 @@ public virtual ValueTask AddListener(Action /// Listener whose registration status shall be tested. /// True if callback is registered to the event. + [JsAccessPath("hasListener")] public virtual ValueTask HasListener(Action callback) { return InvokeAsync("hasListener", callback); @@ -27,6 +29,7 @@ public virtual ValueTask HasListener(ActionDeregisters an event listener callback from an event. /// Listener that shall be unregistered. + [JsAccessPath("removeListener")] public virtual ValueTask RemoveListener(Action callback) { return InvokeVoidAsync("removeListener", callback); diff --git a/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEventCallbackDetails.cs b/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEventCallbackDetails.cs index 4f13ff5..757d564 100644 --- a/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEventCallbackDetails.cs +++ b/src/WebExtensions.Net/Generated/Runtime/OnUpdateAvailableEventCallbackDetails.cs @@ -9,6 +9,7 @@ namespace WebExtensions.Net.Runtime public partial class OnUpdateAvailableEventCallbackDetails : BaseObject { /// The version number of the available update. + [JsAccessPath("version")] [JsonPropertyName("version")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Version { get; set; } diff --git a/src/WebExtensions.Net/Generated/Runtime/PlatformInfo.cs b/src/WebExtensions.Net/Generated/Runtime/PlatformInfo.cs index 4ebbcc3..345439f 100644 --- a/src/WebExtensions.Net/Generated/Runtime/PlatformInfo.cs +++ b/src/WebExtensions.Net/Generated/Runtime/PlatformInfo.cs @@ -9,10 +9,12 @@ namespace WebExtensions.Net.Runtime public partial class PlatformInfo : BaseObject { /// The machine's processor architecture. + [JsAccessPath("arch")] [JsonPropertyName("arch")] public PlatformArch Arch { get; set; } /// The operating system the browser is running on. + [JsAccessPath("os")] [JsonPropertyName("os")] public PlatformOs Os { get; set; } } diff --git a/src/WebExtensions.Net/Generated/Runtime/Port.cs b/src/WebExtensions.Net/Generated/Runtime/Port.cs index b0b0f79..61ef3ee 100644 --- a/src/WebExtensions.Net/Generated/Runtime/Port.cs +++ b/src/WebExtensions.Net/Generated/Runtime/Port.cs @@ -11,26 +11,31 @@ namespace WebExtensions.Net.Runtime public partial class Port : BaseObject { /// + [JsAccessPath("disconnect")] [JsonPropertyName("disconnect")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Action Disconnect { get; set; } /// + [JsAccessPath("name")] [JsonPropertyName("name")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Name { get; set; } /// + [JsAccessPath("onDisconnect")] [JsonPropertyName("onDisconnect")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Event OnDisconnect { get; set; } /// + [JsAccessPath("onMessage")] [JsonPropertyName("onMessage")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Event OnMessage { get; set; } /// This property will 'b'only'/b' be present on ports passed to onConnect/onConnectExternal listeners. + [JsAccessPath("sender")] [JsonPropertyName("sender")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public MessageSender Sender { get; set; } diff --git a/src/WebExtensions.Net/Generated/Scripting/CSSInjection.cs b/src/WebExtensions.Net/Generated/Scripting/CSSInjection.cs index b0bbf79..a3f8994 100644 --- a/src/WebExtensions.Net/Generated/Scripting/CSSInjection.cs +++ b/src/WebExtensions.Net/Generated/Scripting/CSSInjection.cs @@ -10,21 +10,25 @@ namespace WebExtensions.Net.Scripting public partial class CSSInjection : BaseObject { /// A string containing the CSS to inject. Exactly one of files and css must be specified. + [JsAccessPath("css")] [JsonPropertyName("css")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Css { get; set; } /// The path of the CSS files to inject, relative to the extension's root directory. Exactly one of files and css must be specified. + [JsAccessPath("files")] [JsonPropertyName("files")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Files { get; set; } /// The style origin for the injection. Defaults to 'AUTHOR'. + [JsAccessPath("origin")] [JsonPropertyName("origin")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Origin { get; set; } /// Details specifying the target into which to inject the CSS. + [JsAccessPath("target")] [JsonPropertyName("target")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public InjectionTarget Target { get; set; } diff --git a/src/WebExtensions.Net/Generated/Scripting/ContentScriptFilter.cs b/src/WebExtensions.Net/Generated/Scripting/ContentScriptFilter.cs index dc4cd87..0404795 100644 --- a/src/WebExtensions.Net/Generated/Scripting/ContentScriptFilter.cs +++ b/src/WebExtensions.Net/Generated/Scripting/ContentScriptFilter.cs @@ -10,6 +10,7 @@ namespace WebExtensions.Net.Scripting public partial class ContentScriptFilter : BaseObject { /// The IDs of specific scripts to retrieve with getRegisteredContentScripts() or to unregister with unregisterContentScripts(). + [JsAccessPath("ids")] [JsonPropertyName("ids")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable Ids { get; set; } diff --git a/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs b/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs index f590869..c546996 100644 --- a/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs +++ b/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs @@ -1,39 +1,48 @@ +using JsBind.Net; using System.Collections.Generic; using System.Threading.Tasks; namespace WebExtensions.Net.Scripting { /// Use the scripting API to execute script in different contexts. + [JsAccessPath("scripting")] public partial interface IScriptingApi { /// Injects a script into a target context. The script will be run at document_idle. /// The details of the script which to inject. /// + [JsAccessPath("executeScript")] ValueTask> ExecuteScript(ScriptInjection injection); /// Returns all dynamically registered content scripts for this extension that match the given filter. /// An object to filter the extension's dynamically registered scripts. /// + [JsAccessPath("getRegisteredContentScripts")] ValueTask> GetRegisteredContentScripts(ContentScriptFilter filter = null); /// Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored. /// The details of the styles to insert. + [JsAccessPath("insertCSS")] ValueTask InsertCSS(CSSInjection injection); /// Registers one or more content scripts for this extension. /// Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered. + [JsAccessPath("registerContentScripts")] ValueTask RegisterContentScripts(IEnumerable scripts); /// Removes a CSS stylesheet that was previously inserted by this extension from a target context. /// The details of the styles to remove. Note that the css, files, and origin properties must exactly match the stylesheet inserted through insertCSS. Attempting to remove a non-existent stylesheet is a no-op. + [JsAccessPath("removeCSS")] ValueTask RemoveCSS(CSSInjection injection); /// Unregisters one or more content scripts for this extension. /// If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered. + [JsAccessPath("unregisterContentScripts")] ValueTask UnregisterContentScripts(ContentScriptFilter filter = null); /// Updates one or more content scripts for this extension. /// Contains a list of scripts to be updated. If there are errors during script parsing/file validation, or if the IDs specified do not already exist, then no scripts are updated. + [JsAccessPath("updateContentScripts")] ValueTask UpdateContentScripts(IEnumerable