diff --git a/src/WebExtensions.Net/Generated/Action/ActionApi.cs b/src/WebExtensions.Net/Generated/Action/ActionApi.cs index 16d2b03..ceacf38 100644 --- a/src/WebExtensions.Net/Generated/Action/ActionApi.cs +++ b/src/WebExtensions.Net/Generated/Action/ActionApi.cs @@ -30,13 +30,13 @@ public OnClickedEvent OnClicked } /// - public virtual ValueTask Disable(int? tabId) + public virtual ValueTask Disable(int? tabId = null) { return InvokeVoidAsync("disable", tabId); } /// - public virtual ValueTask Enable(int? tabId) + public virtual ValueTask Enable(int? tabId = null) { return InvokeVoidAsync("enable", tabId); } @@ -84,7 +84,7 @@ public virtual ValueTask IsEnabled(Details details) } /// - public virtual ValueTask OpenPopup(Options options) + public virtual ValueTask OpenPopup(Options options = null) { return InvokeVoidAsync("openPopup", options); } diff --git a/src/WebExtensions.Net/Generated/Action/IActionApi.cs b/src/WebExtensions.Net/Generated/Action/IActionApi.cs index ab4753c..3a80099 100644 --- a/src/WebExtensions.Net/Generated/Action/IActionApi.cs +++ b/src/WebExtensions.Net/Generated/Action/IActionApi.cs @@ -10,11 +10,11 @@ public partial interface IActionApi /// Disables the browser action for a tab. /// The id of the tab for which you want to modify the browser action. - ValueTask Disable(int? tabId); + 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. - ValueTask Enable(int? tabId); + ValueTask Enable(int? tabId = null); /// Gets the background color of the browser action badge. /// @@ -50,7 +50,7 @@ public partial interface IActionApi /// Opens the extension popup window in the specified window. /// An object with information about the popup to open. - ValueTask OpenPopup(Options options); + ValueTask OpenPopup(Options options = null); /// Sets the background color for the badge. /// diff --git a/src/WebExtensions.Net/Generated/Alarms/AlarmsApi.cs b/src/WebExtensions.Net/Generated/Alarms/AlarmsApi.cs index 0c0815b..f007a3e 100644 --- a/src/WebExtensions.Net/Generated/Alarms/AlarmsApi.cs +++ b/src/WebExtensions.Net/Generated/Alarms/AlarmsApi.cs @@ -31,7 +31,7 @@ public OnAlarmEvent OnAlarm } /// - public virtual ValueTask Clear(string name) + public virtual ValueTask Clear(string name = null) { return InvokeAsync("clear", name); } @@ -42,6 +42,12 @@ public virtual ValueTask ClearAll() return InvokeAsync("clearAll"); } + /// + public virtual ValueTask Create(AlarmInfo alarmInfo) + { + return InvokeVoidAsync("create", alarmInfo); + } + /// public virtual ValueTask Create(string name, AlarmInfo alarmInfo) { @@ -49,7 +55,7 @@ public virtual ValueTask Create(string name, AlarmInfo alarmInfo) } /// - public virtual ValueTask Get(string name) + public virtual ValueTask Get(string name = null) { return InvokeAsync("get", name); } diff --git a/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs b/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs index ee11c99..c83f55b 100644 --- a/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs +++ b/src/WebExtensions.Net/Generated/Alarms/IAlarmsApi.cs @@ -12,12 +12,16 @@ public partial interface IAlarmsApi /// 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. - ValueTask Clear(string name); + ValueTask Clear(string name = null); /// Clears all alarms. /// Whether any alarm was found to clear. 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. + 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. @@ -26,7 +30,7 @@ public partial interface IAlarmsApi /// Retrieves details about the specified alarm. /// The name of the alarm to get. Defaults to the empty string. /// - ValueTask Get(string name); + ValueTask Get(string name = null); /// Gets an array of all the alarms. /// diff --git a/src/WebExtensions.Net/Generated/BrowserAction/BrowserActionApi.cs b/src/WebExtensions.Net/Generated/BrowserAction/BrowserActionApi.cs index f5ffec5..c4a506e 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/BrowserActionApi.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/BrowserActionApi.cs @@ -30,13 +30,13 @@ public OnClickedEvent OnClicked } /// - public virtual ValueTask Disable(int? tabId) + public virtual ValueTask Disable(int? tabId = null) { return InvokeVoidAsync("disable", tabId); } /// - public virtual ValueTask Enable(int? tabId) + public virtual ValueTask Enable(int? tabId = null) { return InvokeVoidAsync("enable", tabId); } diff --git a/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs b/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs index 90c2cce..19bfe68 100644 --- a/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs +++ b/src/WebExtensions.Net/Generated/BrowserAction/IBrowserActionApi.cs @@ -10,11 +10,11 @@ public partial interface IBrowserActionApi /// Disables the browser action for a tab. /// The id of the tab for which you want to modify the browser action. - ValueTask Disable(int? tabId); + 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. - ValueTask Enable(int? tabId); + ValueTask Enable(int? tabId = null); /// Gets the background color of the browser action badge. /// diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/DeclarativeNetRequestApi.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/DeclarativeNetRequestApi.cs index 6b06614..b9ef145 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/DeclarativeNetRequestApi.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/DeclarativeNetRequestApi.cs @@ -66,7 +66,7 @@ public virtual ValueTask IsRegexSupported(RegexO } /// - public virtual ValueTask TestMatchOutcome(Request request, TestMatchOutcomeOptions options) + public virtual ValueTask TestMatchOutcome(Request request, TestMatchOutcomeOptions options = null) { return InvokeAsync("testMatchOutcome", request, options); } diff --git a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs index fe74265..c4dbad3 100644 --- a/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs +++ b/src/WebExtensions.Net/Generated/DeclarativeNetRequest/IDeclarativeNetRequestApi.cs @@ -52,7 +52,7 @@ public partial interface IDeclarativeNetRequestApi /// The details of the request to test. /// /// - ValueTask TestMatchOutcome(Request request, TestMatchOutcomeOptions options); + 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. /// diff --git a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs index a474556..55cf376 100644 --- a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs +++ b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/IInspectedWindowApi.cs @@ -12,10 +12,10 @@ public partial interface IInspectedWindowApi /// An expression to evaluate. /// The options parameter can contain one or more options. /// - ValueTask Eval(string expression, object options); + ValueTask Eval(string expression, object options = null); /// Reloads the inspected page. /// - ValueTask Reload(ReloadOptions reloadOptions); + ValueTask Reload(ReloadOptions reloadOptions = null); } } diff --git a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/InspectedWindowApi.cs b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/InspectedWindowApi.cs index bc4cf0a..82a1814 100644 --- a/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/InspectedWindowApi.cs +++ b/src/WebExtensions.Net/Generated/Devtools/InspectedWindow/InspectedWindowApi.cs @@ -17,13 +17,13 @@ public InspectedWindowApi(IJsRuntimeAdapter jsRuntime, string accessPath) : base public int TabId => GetProperty("tabId"); /// - public virtual ValueTask Eval(string expression, object options) + public virtual ValueTask Eval(string expression, object options = null) { return InvokeAsync("eval", expression, options); } /// - public virtual ValueTask Reload(ReloadOptions reloadOptions) + public virtual ValueTask Reload(ReloadOptions reloadOptions = null) { return InvokeVoidAsync("reload", reloadOptions); } diff --git a/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs b/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs index 8869e18..8dbaf60 100644 --- a/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs +++ b/src/WebExtensions.Net/Generated/Devtools/Panels/ExtensionSidebarPane.cs @@ -12,7 +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. - public virtual ValueTask SetExpression(string expression, string rootTitle) + public virtual ValueTask SetExpression(string expression, string rootTitle = null) { return InvokeVoidAsync("setExpression", expression, rootTitle); } @@ -20,7 +20,7 @@ public virtual ValueTask SetExpression(string expression, string rootTitle) /// 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. - public virtual ValueTask SetObject(string jsonObject, string rootTitle) + public virtual ValueTask SetObject(string jsonObject, string rootTitle = null) { return InvokeVoidAsync("setObject", jsonObject, rootTitle); } diff --git a/src/WebExtensions.Net/Generated/Downloads/DownloadsApi.cs b/src/WebExtensions.Net/Generated/Downloads/DownloadsApi.cs index 973569c..2faecc3 100644 --- a/src/WebExtensions.Net/Generated/Downloads/DownloadsApi.cs +++ b/src/WebExtensions.Net/Generated/Downloads/DownloadsApi.cs @@ -79,7 +79,7 @@ public virtual ValueTask> Erase(DownloadQuery query) } /// - public virtual ValueTask GetFileIcon(int downloadId, GetFileIconOptions options) + public virtual ValueTask GetFileIcon(int downloadId, GetFileIconOptions options = null) { return InvokeAsync("getFileIcon", downloadId, options); } diff --git a/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs b/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs index a4df2af..1eeb4a0 100644 --- a/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs +++ b/src/WebExtensions.Net/Generated/Downloads/IDownloadsApi.cs @@ -33,7 +33,7 @@ public partial interface IDownloadsApi /// The identifier for the download. /// /// - ValueTask GetFileIcon(int downloadId, GetFileIconOptions options); + ValueTask GetFileIcon(int downloadId, GetFileIconOptions options = null); /// Open the downloaded file. /// diff --git a/src/WebExtensions.Net/Generated/Extension/ExtensionApi.cs b/src/WebExtensions.Net/Generated/Extension/ExtensionApi.cs index 5d68ba4..c2f5780 100644 --- a/src/WebExtensions.Net/Generated/Extension/ExtensionApi.cs +++ b/src/WebExtensions.Net/Generated/Extension/ExtensionApi.cs @@ -37,7 +37,7 @@ public virtual ValueTask GetURL(string path) } /// - public virtual ValueTask> GetViews(FetchProperties fetchProperties) + public virtual ValueTask> GetViews(FetchProperties fetchProperties = null) { return InvokeAsync>("getViews", fetchProperties); } diff --git a/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs b/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs index bb80a97..964b400 100644 --- a/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs +++ b/src/WebExtensions.Net/Generated/Extension/IExtensionApi.cs @@ -28,7 +28,7 @@ public partial interface IExtensionApi /// Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension. /// /// Array of global objects - ValueTask> GetViews(FetchProperties fetchProperties); + 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. diff --git a/src/WebExtensions.Net/Generated/I18n/I18nApi.cs b/src/WebExtensions.Net/Generated/I18n/I18nApi.cs index a1364ef..65a8e71 100644 --- a/src/WebExtensions.Net/Generated/I18n/I18nApi.cs +++ b/src/WebExtensions.Net/Generated/I18n/I18nApi.cs @@ -27,7 +27,7 @@ public virtual ValueTask> GetAcceptLanguages() } /// - public virtual ValueTask GetMessage(string messageName, object substitutions) + public virtual ValueTask GetMessage(string messageName, object substitutions = null) { return InvokeAsync("getMessage", messageName, substitutions); } diff --git a/src/WebExtensions.Net/Generated/I18n/II18nApi.cs b/src/WebExtensions.Net/Generated/I18n/II18nApi.cs index 8219d56..217ecc3 100644 --- a/src/WebExtensions.Net/Generated/I18n/II18nApi.cs +++ b/src/WebExtensions.Net/Generated/I18n/II18nApi.cs @@ -19,7 +19,7 @@ public partial interface II18nApi /// 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. - ValueTask GetMessage(string messageName, object substitutions); + 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. diff --git a/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs b/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs index 1f4443c..7a4404e 100644 --- a/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs +++ b/src/WebExtensions.Net/Generated/Identity/IIdentityApi.cs @@ -8,7 +8,7 @@ public partial interface IIdentityApi /// Generates a redirect URL to be used in |launchWebAuthFlow|. /// The path appended to the end of the generated URL. /// - ValueTask GetRedirectURL(string path); + ValueTask GetRedirectURL(string path = null); /// Starts an auth flow at the specified URL. /// diff --git a/src/WebExtensions.Net/Generated/Identity/IdentityApi.cs b/src/WebExtensions.Net/Generated/Identity/IdentityApi.cs index a42544e..96bf35e 100644 --- a/src/WebExtensions.Net/Generated/Identity/IdentityApi.cs +++ b/src/WebExtensions.Net/Generated/Identity/IdentityApi.cs @@ -14,7 +14,7 @@ public IdentityApi(IJsRuntimeAdapter jsRuntime, string accessPath) : base(jsRunt } /// - public virtual ValueTask GetRedirectURL(string path) + public virtual ValueTask GetRedirectURL(string path = null) { return InvokeAsync("getRedirectURL", path); } diff --git a/src/WebExtensions.Net/Generated/Management/IManagementApi.cs b/src/WebExtensions.Net/Generated/Management/IManagementApi.cs index dc7de11..efc0559 100644 --- a/src/WebExtensions.Net/Generated/Management/IManagementApi.cs +++ b/src/WebExtensions.Net/Generated/Management/IManagementApi.cs @@ -44,6 +44,6 @@ public partial interface IManagementApi /// Uninstalls the calling extension. Note: This function can be used without requesting the 'management' permission in the manifest. /// - ValueTask UninstallSelf(UninstallSelfOptions options); + ValueTask UninstallSelf(UninstallSelfOptions options = null); } } diff --git a/src/WebExtensions.Net/Generated/Management/ManagementApi.cs b/src/WebExtensions.Net/Generated/Management/ManagementApi.cs index 4b41534..15337f7 100644 --- a/src/WebExtensions.Net/Generated/Management/ManagementApi.cs +++ b/src/WebExtensions.Net/Generated/Management/ManagementApi.cs @@ -107,7 +107,7 @@ public virtual ValueTask SetEnabled(string id, bool enabled) } /// - public virtual ValueTask UninstallSelf(UninstallSelfOptions options) + public virtual ValueTask UninstallSelf(UninstallSelfOptions options = null) { return InvokeVoidAsync("uninstallSelf", options); } diff --git a/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs b/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs index 262ba5e..2414b64 100644 --- a/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs +++ b/src/WebExtensions.Net/Generated/Menus/IMenusApi.cs @@ -24,7 +24,7 @@ public partial interface IMenusApi /// /// 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. - ValueTask Create(CreateProperties createProperties, Action callback); + 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. diff --git a/src/WebExtensions.Net/Generated/Menus/MenusApi.cs b/src/WebExtensions.Net/Generated/Menus/MenusApi.cs index 86e875a..a7cc86e 100644 --- a/src/WebExtensions.Net/Generated/Menus/MenusApi.cs +++ b/src/WebExtensions.Net/Generated/Menus/MenusApi.cs @@ -66,7 +66,7 @@ public OnShownEvent OnShown } /// - public virtual ValueTask Create(CreateProperties createProperties, Action callback) + public virtual ValueTask Create(CreateProperties createProperties, Action callback = null) { return InvokeAsync("create", createProperties, callback); } diff --git a/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs b/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs index 90f873f..4943bb1 100644 --- a/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs +++ b/src/WebExtensions.Net/Generated/Notifications/INotificationsApi.cs @@ -23,6 +23,11 @@ public partial interface INotificationsApi /// Indicates whether a matching notification existed. 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. + 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. diff --git a/src/WebExtensions.Net/Generated/Notifications/NotificationsApi.cs b/src/WebExtensions.Net/Generated/Notifications/NotificationsApi.cs index ba5b641..77fe2c3 100644 --- a/src/WebExtensions.Net/Generated/Notifications/NotificationsApi.cs +++ b/src/WebExtensions.Net/Generated/Notifications/NotificationsApi.cs @@ -81,6 +81,12 @@ public virtual ValueTask Clear(string notificationId) return InvokeAsync("clear", notificationId); } + /// + public virtual ValueTask Create(NotificationOptions options) + { + return InvokeAsync("create", options); + } + /// public virtual ValueTask Create(string notificationId, NotificationOptions options) { diff --git a/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs b/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs index 86f90b5..af92df5 100644 --- a/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs +++ b/src/WebExtensions.Net/Generated/Runtime/IRuntimeApi.cs @@ -44,7 +44,7 @@ public partial interface IRuntimeApi /// 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. - ValueTask Connect(string extensionId, ConnectInfo connectInfo); + 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. @@ -83,12 +83,18 @@ public partial interface IRuntimeApi /// Reloads the app or extension. 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. + 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). /// The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for $(topic:manifest/externally_connectable)[web messaging]. /// /// /// 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. - ValueTask SendMessage(string extensionId, object message, object options); + ValueTask SendMessage(string extensionId, object message, object options = null); /// Send a single message to a native application. /// The name of the native messaging host. @@ -98,6 +104,6 @@ public partial interface IRuntimeApi /// 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. - ValueTask SetUninstallURL(string url); + ValueTask SetUninstallURL(string url = null); } } diff --git a/src/WebExtensions.Net/Generated/Runtime/RuntimeApi.cs b/src/WebExtensions.Net/Generated/Runtime/RuntimeApi.cs index c1d6bc2..e6de284 100644 --- a/src/WebExtensions.Net/Generated/Runtime/RuntimeApi.cs +++ b/src/WebExtensions.Net/Generated/Runtime/RuntimeApi.cs @@ -158,7 +158,7 @@ public OnUpdateAvailableEvent OnUpdateAvailable } /// - public virtual ValueTask Connect(string extensionId, ConnectInfo connectInfo) + public virtual ValueTask Connect(string extensionId = null, ConnectInfo connectInfo = null) { return InvokeAsync("connect", extensionId, connectInfo); } @@ -218,7 +218,13 @@ public virtual ValueTask Reload() } /// - public virtual ValueTask SendMessage(string extensionId, object message, object options) + public virtual ValueTask SendMessage(object message, object options = null) + { + return InvokeAsync("sendMessage", message, options); + } + + /// + public virtual ValueTask SendMessage(string extensionId, object message, object options = null) { return InvokeAsync("sendMessage", extensionId, message, options); } @@ -230,7 +236,7 @@ public virtual ValueTask SendNativeMessage(string application, obje } /// - public virtual ValueTask SetUninstallURL(string url) + public virtual ValueTask SetUninstallURL(string url = null) { return InvokeVoidAsync("setUninstallURL", url); } diff --git a/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs b/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs index 2da34d8..f590869 100644 --- a/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs +++ b/src/WebExtensions.Net/Generated/Scripting/IScriptingApi.cs @@ -14,7 +14,7 @@ public partial interface IScriptingApi /// Returns all dynamically registered content scripts for this extension that match the given filter. /// An object to filter the extension's dynamically registered scripts. /// - ValueTask> GetRegisteredContentScripts(ContentScriptFilter filter); + 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. @@ -30,7 +30,7 @@ public partial interface IScriptingApi /// 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. - ValueTask UnregisterContentScripts(ContentScriptFilter filter); + 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. diff --git a/src/WebExtensions.Net/Generated/Scripting/ScriptingApi.cs b/src/WebExtensions.Net/Generated/Scripting/ScriptingApi.cs index e3d0d7b..fe39cbe 100644 --- a/src/WebExtensions.Net/Generated/Scripting/ScriptingApi.cs +++ b/src/WebExtensions.Net/Generated/Scripting/ScriptingApi.cs @@ -21,7 +21,7 @@ public virtual ValueTask> ExecuteScript(ScriptInjec } /// - public virtual ValueTask> GetRegisteredContentScripts(ContentScriptFilter filter) + public virtual ValueTask> GetRegisteredContentScripts(ContentScriptFilter filter = null) { return InvokeAsync>("getRegisteredContentScripts", filter); } @@ -45,7 +45,7 @@ public virtual ValueTask RemoveCSS(CSSInjection injection) } /// - public virtual ValueTask UnregisterContentScripts(ContentScriptFilter filter) + public virtual ValueTask UnregisterContentScripts(ContentScriptFilter filter = null) { return InvokeVoidAsync("unregisterContentScripts", filter); } diff --git a/src/WebExtensions.Net/Generated/Sessions/ISessionsApi.cs b/src/WebExtensions.Net/Generated/Sessions/ISessionsApi.cs index e1e5ac2..31736cd 100644 --- a/src/WebExtensions.Net/Generated/Sessions/ISessionsApi.cs +++ b/src/WebExtensions.Net/Generated/Sessions/ISessionsApi.cs @@ -25,7 +25,7 @@ public partial interface ISessionsApi /// Gets the list of recently closed tabs and/or windows. /// /// The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows. - ValueTask> GetRecentlyClosed(Filter filter); + ValueTask> GetRecentlyClosed(Filter filter = null); /// Retrieve a value that was set for a given key on a given tab. /// The id of the tab whose value is being retrieved from. @@ -50,7 +50,7 @@ public partial interface ISessionsApi /// Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored. /// The $(ref:windows.Window.sessionId), or $(ref:tabs.Tab.sessionId) to restore. If this parameter is not specified, the most recently closed session is restored. /// A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or $(ref:tabs.Tab) object. - ValueTask Restore(string sessionId); + ValueTask Restore(string sessionId = null); /// Set a key/value pair on a given tab. /// The id of the tab that the key/value pair is being set on. diff --git a/src/WebExtensions.Net/Generated/Sessions/SessionsApi.cs b/src/WebExtensions.Net/Generated/Sessions/SessionsApi.cs index c8f6811..da1e748 100644 --- a/src/WebExtensions.Net/Generated/Sessions/SessionsApi.cs +++ b/src/WebExtensions.Net/Generated/Sessions/SessionsApi.cs @@ -47,7 +47,7 @@ public virtual ValueTask ForgetClosedWindow(string sessionId) } /// - public virtual ValueTask> GetRecentlyClosed(Filter filter) + public virtual ValueTask> GetRecentlyClosed(Filter filter = null) { return InvokeAsync>("getRecentlyClosed", filter); } @@ -77,7 +77,7 @@ public virtual ValueTask RemoveWindowValue(int windowId, string key) } /// - public virtual ValueTask Restore(string sessionId) + public virtual ValueTask Restore(string sessionId = null) { return InvokeAsync("restore", sessionId); } diff --git a/src/WebExtensions.Net/Generated/Storage/StorageArea.cs b/src/WebExtensions.Net/Generated/Storage/StorageArea.cs index 214c8b7..7e5c30f 100644 --- a/src/WebExtensions.Net/Generated/Storage/StorageArea.cs +++ b/src/WebExtensions.Net/Generated/Storage/StorageArea.cs @@ -18,7 +18,7 @@ public virtual ValueTask Clear() /// Gets one or more items from storage. /// A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in null to get the entire contents of storage. /// Object with items in their key-value mappings. - public virtual ValueTask Get(StorageAreaGetKeys keys) + public virtual ValueTask Get(StorageAreaGetKeys keys = null) { return InvokeAsync("get", keys); } diff --git a/src/WebExtensions.Net/Generated/Storage/StorageAreaSync.cs b/src/WebExtensions.Net/Generated/Storage/StorageAreaSync.cs index 1b2bb65..585be72 100644 --- a/src/WebExtensions.Net/Generated/Storage/StorageAreaSync.cs +++ b/src/WebExtensions.Net/Generated/Storage/StorageAreaSync.cs @@ -18,7 +18,7 @@ public virtual ValueTask Clear() /// Gets one or more items from storage. /// A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in null to get the entire contents of storage. /// Object with items in their key-value mappings. - public virtual ValueTask Get(StorageAreaSyncGetKeys keys) + public virtual ValueTask Get(StorageAreaSyncGetKeys keys = null) { return InvokeAsync("get", keys); } @@ -26,7 +26,7 @@ public virtual ValueTask Get(StorageAreaSyncGetKeys keys) /// Gets the amount of space (in bytes) being used by one or more items. /// A single key or list of keys to get the total usage for. An empty list will return 0. Pass in null to get the total usage of all of storage. /// Amount of space being used in storage, in bytes. - public virtual ValueTask GetBytesInUse(StorageAreaSyncGetBytesInUseKeys keys) + public virtual ValueTask GetBytesInUse(StorageAreaSyncGetBytesInUseKeys keys = null) { return InvokeAsync("getBytesInUse", keys); } diff --git a/src/WebExtensions.Net/Generated/Tabs/ITabsApi.cs b/src/WebExtensions.Net/Generated/Tabs/ITabsApi.cs index 867ee48..7d8c47e 100644 --- a/src/WebExtensions.Net/Generated/Tabs/ITabsApi.cs +++ b/src/WebExtensions.Net/Generated/Tabs/ITabsApi.cs @@ -46,19 +46,19 @@ public partial interface ITabsApi /// Captures an area of a specified tab. You must have $(topic:declare_permissions)[<all_urls>] permission to use this method. /// The tab to capture. Defaults to the active tab of the current window. /// - ValueTask CaptureTab(int? tabId, ImageDetails options); + ValueTask CaptureTab(int? tabId = null, ImageDetails options = null); /// Captures an area of the currently active tab in the specified window. You must have $(topic:declare_permissions)[<all_urls>] permission to use this method. /// The target window. Defaults to the $(topic:current-window)[current window]. /// /// A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display. - ValueTask CaptureVisibleTab(int? windowId, ImageDetails options); + ValueTask CaptureVisibleTab(int? windowId = null, ImageDetails options = null); /// Connects to the content script(s) in the specified tab. The $(ref:runtime.onConnect) event is fired in each content script running in the specified tab for the current extension. For more details, see $(topic:messaging)[Content Script Messaging]. /// /// /// A port that can be used to communicate with the content scripts running in the specified tab. The port's $(ref:runtime.Port) event is fired if the tab closes or does not exist. - ValueTask Connect(int tabId, ConnectInfo connectInfo); + ValueTask Connect(int tabId, ConnectInfo connectInfo = null); /// Creates a new tab. /// @@ -68,7 +68,7 @@ public partial interface ITabsApi /// Detects the primary language of the content in a tab. /// Defaults to the active tab of the $(topic:current-window)[current window]. /// An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, und will be returned. - ValueTask DetectLanguage(int? tabId); + ValueTask DetectLanguage(int? tabId = null); /// discards one or more tabs. /// The tab or list of tabs to discard. @@ -82,7 +82,12 @@ public partial interface ITabsApi /// The ID of the tab which is to be duplicated. /// /// Details about the duplicated tab. The $(ref:tabs.Tab) object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested. - ValueTask Duplicate(int tabId, DuplicateProperties duplicateProperties); + ValueTask Duplicate(int tabId, DuplicateProperties duplicateProperties = null); + + /// Injects JavaScript code into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc. + /// Details of the script to run. + /// The result of the script in every injected frame. + ValueTask> ExecuteScript(InjectDetails details); /// Injects JavaScript code into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc. /// The ID of the tab in which to run the script; defaults to the active tab of the current window. @@ -102,20 +107,20 @@ public partial interface ITabsApi /// Gets the current zoom factor of a specified tab. /// The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window. /// The tab's current zoom factor. - ValueTask GetZoom(int? tabId); + ValueTask GetZoom(int? tabId = null); /// Gets the current zoom settings of a specified tab. /// The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window. /// The tab's current zoom settings. - ValueTask GetZoomSettings(int? tabId); + ValueTask GetZoomSettings(int? tabId = null); /// Navigate to previous page in tab's history, if available. /// The ID of the tab to navigate backward. - ValueTask GoBack(int? tabId); + ValueTask GoBack(int? tabId = null); /// Navigate to next page in tab's history, if available /// The ID of the tab to navigate forward. - ValueTask GoForward(int? tabId); + ValueTask GoForward(int? tabId = null); /// Hides one or more tabs. The "tabHide" permission is required to hide tabs. Not all tabs are hidable. Returns an array of hidden tabs. /// The TAB ID or list of TAB IDs to hide. @@ -130,6 +135,10 @@ public partial interface ITabsApi /// Contains details about the window whose tabs were highlighted. ValueTask Highlight(HighlightHighlightInfo highlightInfo); + /// Injects CSS into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc. + /// Details of the CSS text to insert. + ValueTask InsertCSS(InjectDetails details); + /// Injects CSS into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc. /// The ID of the tab in which to insert the CSS; defaults to the active tab of the current window. /// Details of the CSS text to insert. @@ -151,7 +160,7 @@ public partial interface ITabsApi /// An array of tab IDs to move in the line of succession. For each tab in the array, the tab's current predecessors will have their successor set to the tab's current successor, and each tab will then be set to be the successor of the previous tab in the array. Any tabs not in the same window as the tab indicated by the second argument (or the first tab in the array, if no second argument) will be skipped. /// The ID of a tab to set as the successor of the last tab in the array, or $(ref:tabs.TAB_ID_NONE) to leave the last tab without a successor. If options.append is true, then this tab is made the predecessor of the first tab in the array instead. /// - ValueTask MoveInSuccession(IEnumerable tabIds, int? tabId, MoveInSuccessionOptions options); + ValueTask MoveInSuccession(IEnumerable tabIds, int? tabId = null, MoveInSuccessionOptions options = null); /// Prints page in active tab. ValueTask Print(); @@ -167,7 +176,7 @@ public partial interface ITabsApi /// Reload a tab. /// The ID of the tab to reload; defaults to the selected tab of the current window. /// - ValueTask Reload(int? tabId, ReloadProperties reloadProperties); + ValueTask Reload(int? tabId = null, ReloadProperties reloadProperties = null); /// Closes one or more tabs. /// The tab or list of tabs to close. @@ -177,6 +186,10 @@ public partial interface ITabsApi /// The tab or list of tabs to close. ValueTask Remove(IEnumerable tabIds); + /// Removes injected CSS from a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc. + /// Details of the CSS text to remove. + ValueTask RemoveCSS(InjectDetails details); + /// Removes injected CSS from a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc. /// The ID of the tab from which to remove the injected CSS; defaults to the active tab of the current window. /// Details of the CSS text to remove. @@ -192,13 +205,21 @@ public partial interface ITabsApi /// /// /// The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message. - ValueTask SendMessage(int tabId, object message, SendMessageOptions options); + ValueTask SendMessage(int tabId, object message, SendMessageOptions options = null); + + /// Zooms a specified tab. + /// The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab. + ValueTask SetZoom(double zoomFactor); /// Zooms a specified tab. /// The ID of the tab to zoom; defaults to the active tab of the current window. /// The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab. ValueTask SetZoom(int? tabId, double zoomFactor); + /// Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab. + /// Defines how zoom changes are handled and at what scope. + ValueTask SetZoomSettings(ZoomSettings zoomSettings); + /// Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab. /// The ID of the tab to change the zoom settings for; defaults to the active tab of the current window. /// Defines how zoom changes are handled and at what scope. @@ -214,7 +235,12 @@ public partial interface ITabsApi /// Toggles reader mode for the document in the tab. /// Defaults to the active tab of the $(topic:current-window)[current window]. - ValueTask ToggleReaderMode(int? tabId); + ValueTask ToggleReaderMode(int? tabId = null); + + /// Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified. + /// + /// Details about the updated tab. The $(ref:tabs.Tab) object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested. + ValueTask Update(UpdateProperties updateProperties); /// Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified. /// Defaults to the selected tab of the $(topic:current-window)[current window]. @@ -224,6 +250,6 @@ public partial interface ITabsApi /// Warm up a tab /// The ID of the tab to warm up. - ValueTask Warmup(int? tabId); + ValueTask Warmup(int? tabId = null); } } diff --git a/src/WebExtensions.Net/Generated/Tabs/TabsApi.cs b/src/WebExtensions.Net/Generated/Tabs/TabsApi.cs index de71914..70afe02 100644 --- a/src/WebExtensions.Net/Generated/Tabs/TabsApi.cs +++ b/src/WebExtensions.Net/Generated/Tabs/TabsApi.cs @@ -173,19 +173,19 @@ public OnZoomChangeEvent OnZoomChange public int TAB_ID_NONE => -1; /// - public virtual ValueTask CaptureTab(int? tabId, ImageDetails options) + public virtual ValueTask CaptureTab(int? tabId = null, ImageDetails options = null) { return InvokeVoidAsync("captureTab", tabId, options); } /// - public virtual ValueTask CaptureVisibleTab(int? windowId, ImageDetails options) + public virtual ValueTask CaptureVisibleTab(int? windowId = null, ImageDetails options = null) { return InvokeAsync("captureVisibleTab", windowId, options); } /// - public virtual ValueTask Connect(int tabId, ConnectInfo connectInfo) + public virtual ValueTask Connect(int tabId, ConnectInfo connectInfo = null) { return InvokeAsync("connect", tabId, connectInfo); } @@ -197,7 +197,7 @@ public virtual ValueTask Create(CreateProperties createProperties) } /// - public virtual ValueTask DetectLanguage(int? tabId) + public virtual ValueTask DetectLanguage(int? tabId = null) { return InvokeAsync("detectLanguage", tabId); } @@ -215,11 +215,17 @@ public virtual ValueTask Discard(IEnumerable tabIds) } /// - public virtual ValueTask Duplicate(int tabId, DuplicateProperties duplicateProperties) + public virtual ValueTask Duplicate(int tabId, DuplicateProperties duplicateProperties = null) { return InvokeAsync("duplicate", tabId, duplicateProperties); } + /// + public virtual ValueTask> ExecuteScript(InjectDetails details) + { + return InvokeAsync>("executeScript", details); + } + /// public virtual ValueTask> ExecuteScript(int? tabId, InjectDetails details) { @@ -239,25 +245,25 @@ public virtual ValueTask GetCurrent() } /// - public virtual ValueTask GetZoom(int? tabId) + public virtual ValueTask GetZoom(int? tabId = null) { return InvokeAsync("getZoom", tabId); } /// - public virtual ValueTask GetZoomSettings(int? tabId) + public virtual ValueTask GetZoomSettings(int? tabId = null) { return InvokeAsync("getZoomSettings", tabId); } /// - public virtual ValueTask GoBack(int? tabId) + public virtual ValueTask GoBack(int? tabId = null) { return InvokeVoidAsync("goBack", tabId); } /// - public virtual ValueTask GoForward(int? tabId) + public virtual ValueTask GoForward(int? tabId = null) { return InvokeVoidAsync("goForward", tabId); } @@ -280,6 +286,12 @@ public virtual ValueTask Highlight(HighlightHighlightInfo highlightInfo) return InvokeAsync("highlight", highlightInfo); } + /// + public virtual ValueTask InsertCSS(InjectDetails details) + { + return InvokeVoidAsync("insertCSS", details); + } + /// public virtual ValueTask InsertCSS(int? tabId, InjectDetails details) { @@ -299,7 +311,7 @@ public virtual ValueTask Move(IEnumerable tabIds, MovePropert } /// - public virtual ValueTask MoveInSuccession(IEnumerable tabIds, int? tabId, MoveInSuccessionOptions options) + public virtual ValueTask MoveInSuccession(IEnumerable tabIds, int? tabId = null, MoveInSuccessionOptions options = null) { return InvokeVoidAsync("moveInSuccession", tabIds, tabId, options); } @@ -323,7 +335,7 @@ public virtual ValueTask> Query(QueryInfo queryInfo) } /// - public virtual ValueTask Reload(int? tabId, ReloadProperties reloadProperties) + public virtual ValueTask Reload(int? tabId = null, ReloadProperties reloadProperties = null) { return InvokeVoidAsync("reload", tabId, reloadProperties); } @@ -340,6 +352,12 @@ public virtual ValueTask Remove(IEnumerable tabIds) return InvokeVoidAsync("remove", tabIds); } + /// + public virtual ValueTask RemoveCSS(InjectDetails details) + { + return InvokeVoidAsync("removeCSS", details); + } + /// public virtual ValueTask RemoveCSS(int? tabId, InjectDetails details) { @@ -353,17 +371,29 @@ public virtual ValueTask SaveAsPDF(PageSettings pageSettings) } /// - public virtual ValueTask SendMessage(int tabId, object message, SendMessageOptions options) + public virtual ValueTask SendMessage(int tabId, object message, SendMessageOptions options = null) { return InvokeAsync("sendMessage", tabId, message, options); } + /// + public virtual ValueTask SetZoom(double zoomFactor) + { + return InvokeVoidAsync("setZoom", zoomFactor); + } + /// public virtual ValueTask SetZoom(int? tabId, double zoomFactor) { return InvokeVoidAsync("setZoom", tabId, zoomFactor); } + /// + public virtual ValueTask SetZoomSettings(ZoomSettings zoomSettings) + { + return InvokeVoidAsync("setZoomSettings", zoomSettings); + } + /// public virtual ValueTask SetZoomSettings(int? tabId, ZoomSettings zoomSettings) { @@ -383,11 +413,17 @@ public virtual ValueTask Show(IEnumerable tabIds) } /// - public virtual ValueTask ToggleReaderMode(int? tabId) + public virtual ValueTask ToggleReaderMode(int? tabId = null) { return InvokeVoidAsync("toggleReaderMode", tabId); } + /// + public virtual ValueTask Update(UpdateProperties updateProperties) + { + return InvokeAsync("update", updateProperties); + } + /// public virtual ValueTask Update(int? tabId, UpdateProperties updateProperties) { @@ -395,7 +431,7 @@ public virtual ValueTask Update(int? tabId, UpdateProperties updateProperti } /// - public virtual ValueTask Warmup(int? tabId) + public virtual ValueTask Warmup(int? tabId = null) { return InvokeVoidAsync("warmup", tabId); } diff --git a/src/WebExtensions.Net/Generated/TopSites/ITopSitesApi.cs b/src/WebExtensions.Net/Generated/TopSites/ITopSitesApi.cs index 1f120eb..596751e 100644 --- a/src/WebExtensions.Net/Generated/TopSites/ITopSitesApi.cs +++ b/src/WebExtensions.Net/Generated/TopSites/ITopSitesApi.cs @@ -9,6 +9,6 @@ public partial interface ITopSitesApi /// Gets a list of top sites. /// /// - ValueTask> Get(Options options); + ValueTask> Get(Options options = null); } } diff --git a/src/WebExtensions.Net/Generated/TopSites/TopSitesApi.cs b/src/WebExtensions.Net/Generated/TopSites/TopSitesApi.cs index c3062d3..649e463 100644 --- a/src/WebExtensions.Net/Generated/TopSites/TopSitesApi.cs +++ b/src/WebExtensions.Net/Generated/TopSites/TopSitesApi.cs @@ -15,7 +15,7 @@ public TopSitesApi(IJsRuntimeAdapter jsRuntime, string accessPath) : base(jsRunt } /// - public virtual ValueTask> Get(Options options) + public virtual ValueTask> Get(Options options = null) { return InvokeAsync>("get", options); } diff --git a/src/WebExtensions.Net/Generated/WebRequest/IWebRequestApi.cs b/src/WebExtensions.Net/Generated/WebRequest/IWebRequestApi.cs index d3f7d3e..e23acf2 100644 --- a/src/WebExtensions.Net/Generated/WebRequest/IWebRequestApi.cs +++ b/src/WebExtensions.Net/Generated/WebRequest/IWebRequestApi.cs @@ -44,7 +44,7 @@ public partial interface IWebRequestApi /// Retrieves the security information for the request. Returns a promise that will resolve to a SecurityInfo object. /// /// - ValueTask GetSecurityInfo(string requestId, Options options); + ValueTask GetSecurityInfo(string requestId, Options options = null); /// Needs to be called when the behavior of the webRequest handlers has changed to prevent incorrect handling due to caching. This function call is expensive. Don't call it often. ValueTask HandlerBehaviorChanged(); diff --git a/src/WebExtensions.Net/Generated/WebRequest/WebRequestApi.cs b/src/WebExtensions.Net/Generated/WebRequest/WebRequestApi.cs index d9d2b8e..481d230 100644 --- a/src/WebExtensions.Net/Generated/WebRequest/WebRequestApi.cs +++ b/src/WebExtensions.Net/Generated/WebRequest/WebRequestApi.cs @@ -160,7 +160,7 @@ public virtual ValueTask FilterResponseData(string requestId) } /// - public virtual ValueTask GetSecurityInfo(string requestId, Options options) + public virtual ValueTask GetSecurityInfo(string requestId, Options options = null) { return InvokeVoidAsync("getSecurityInfo", requestId, options); } diff --git a/src/WebExtensions.Net/Generated/Windows/IWindowsApi.cs b/src/WebExtensions.Net/Generated/Windows/IWindowsApi.cs index 9724c33..9221d9e 100644 --- a/src/WebExtensions.Net/Generated/Windows/IWindowsApi.cs +++ b/src/WebExtensions.Net/Generated/Windows/IWindowsApi.cs @@ -24,28 +24,28 @@ public partial interface IWindowsApi /// Creates (opens) a new browser with any optional sizing, position or default URL provided. /// /// Contains details about the created window. - ValueTask Create(CreateData createData); + ValueTask Create(CreateData createData = null); /// Gets details about a window. /// /// /// - ValueTask Get(int windowId, GetInfo getInfo); + ValueTask Get(int windowId, GetInfo getInfo = null); /// Gets all windows. /// Specifies properties used to filter the $(ref:windows.Window) returned and to determine whether they should contain a list of the $(ref:tabs.Tab) objects. /// - ValueTask> GetAll(GetAllGetInfo getInfo); + ValueTask> GetAll(GetAllGetInfo getInfo = null); /// Gets the $(topic:current-window)[current window]. /// /// - ValueTask GetCurrent(GetInfo getInfo); + ValueTask GetCurrent(GetInfo getInfo = null); /// Gets the window that was most recently focused - typically the window 'on top'. /// /// - ValueTask GetLastFocused(GetInfo getInfo); + ValueTask GetLastFocused(GetInfo getInfo = null); /// Removes (closes) a window, and all the tabs inside it. /// diff --git a/src/WebExtensions.Net/Generated/Windows/WindowsApi.cs b/src/WebExtensions.Net/Generated/Windows/WindowsApi.cs index ef41519..f904ad0 100644 --- a/src/WebExtensions.Net/Generated/Windows/WindowsApi.cs +++ b/src/WebExtensions.Net/Generated/Windows/WindowsApi.cs @@ -67,31 +67,31 @@ public OnRemovedEvent OnRemoved public int WINDOW_ID_NONE => -1; /// - public virtual ValueTask Create(CreateData createData) + public virtual ValueTask Create(CreateData createData = null) { return InvokeAsync("create", createData); } /// - public virtual ValueTask Get(int windowId, GetInfo getInfo) + public virtual ValueTask Get(int windowId, GetInfo getInfo = null) { return InvokeAsync("get", windowId, getInfo); } /// - public virtual ValueTask> GetAll(GetAllGetInfo getInfo) + public virtual ValueTask> GetAll(GetAllGetInfo getInfo = null) { return InvokeAsync>("getAll", getInfo); } /// - public virtual ValueTask GetCurrent(GetInfo getInfo) + public virtual ValueTask GetCurrent(GetInfo getInfo = null) { return InvokeAsync("getCurrent", getInfo); } /// - public virtual ValueTask GetLastFocused(GetInfo getInfo) + public virtual ValueTask GetLastFocused(GetInfo getInfo = null) { return InvokeAsync("getLastFocused", getInfo); } diff --git a/src/WebExtensions.Net/Generated/generated.txt b/src/WebExtensions.Net/Generated/generated.txt index 6f57b13..15381ad 100644 --- a/src/WebExtensions.Net/Generated/generated.txt +++ b/src/WebExtensions.Net/Generated/generated.txt @@ -1 +1 @@ -This file is auto generated at 2024-01-24T09:44:19 \ No newline at end of file +This file is auto generated at 2024-05-12T08:22:02 \ No newline at end of file