add missing externs to repo
This commit is contained in:
74
externs/webextension_polyfill/browsingdata/DataTypeSet.hx
Normal file
74
externs/webextension_polyfill/browsingdata/DataTypeSet.hx
Normal file
@@ -0,0 +1,74 @@
|
||||
package webextension_polyfill.browsingdata;
|
||||
|
||||
/**
|
||||
A set of data types. Missing data types are interpreted as <code>false</code>.
|
||||
**/
|
||||
typedef DataTypeSet = {
|
||||
/**
|
||||
The browser's cache. Note: when removing data, this clears the <em>entire</em> cache: it is not limited to the range you
|
||||
specify.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var cache : Bool;
|
||||
/**
|
||||
The browser's cookies.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var cookies : Bool;
|
||||
/**
|
||||
The browser's download list.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var downloads : Bool;
|
||||
/**
|
||||
The browser's stored form data.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var formData : Bool;
|
||||
/**
|
||||
The browser's history.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var history : Bool;
|
||||
/**
|
||||
Websites' IndexedDB data.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var indexedDB : Bool;
|
||||
/**
|
||||
Websites' local storage data.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var localStorage : Bool;
|
||||
/**
|
||||
Server-bound certificates.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var serverBoundCertificates : Bool;
|
||||
/**
|
||||
Stored passwords.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var passwords : Bool;
|
||||
/**
|
||||
Plugins' data.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var pluginData : Bool;
|
||||
/**
|
||||
Service Workers.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var serviceWorkers : Bool;
|
||||
};
|
35
externs/webextension_polyfill/browsingdata/RemovalOptions.hx
Normal file
35
externs/webextension_polyfill/browsingdata/RemovalOptions.hx
Normal file
@@ -0,0 +1,35 @@
|
||||
package webextension_polyfill.browsingdata;
|
||||
|
||||
/**
|
||||
Options that determine exactly what data will be removed.
|
||||
**/
|
||||
typedef RemovalOptions = {
|
||||
/**
|
||||
Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the <code>
|
||||
getTime</code> method of the JavaScript <code>Date</code> object). If absent, defaults to 0 (which would remove all
|
||||
browsing data).
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var since : webextension_polyfill.extensiontypes.DateType;
|
||||
/**
|
||||
Only remove data associated with these hostnames (only applies to cookies and localStorage).
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var hostnames : Array<String>;
|
||||
/**
|
||||
Only remove data associated with this specific cookieStoreId.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var cookieStoreId : String;
|
||||
/**
|
||||
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 <em>really</em>
|
||||
want to remove application data before adding 'protectedWeb' or 'extensions'.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var originTypes : RemovalOptionsOriginTypesType;
|
||||
};
|
@@ -0,0 +1,27 @@
|
||||
package webextension_polyfill.browsingdata;
|
||||
|
||||
/**
|
||||
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 <em>really</em>
|
||||
want to remove application data before adding 'protectedWeb' or 'extensions'.
|
||||
**/
|
||||
typedef RemovalOptionsOriginTypesType = {
|
||||
/**
|
||||
Normal websites.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var unprotectedWeb : Bool;
|
||||
/**
|
||||
Websites that have been installed as hosted applications (be careful!).
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var protectedWeb : Bool;
|
||||
/**
|
||||
Extensions and packaged applications a user has installed (be _really_ careful!).
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var extension : Bool;
|
||||
};
|
@@ -0,0 +1,15 @@
|
||||
package webextension_polyfill.browsingdata;
|
||||
|
||||
typedef SettingsCallbackResultType = {
|
||||
var options : RemovalOptions;
|
||||
/**
|
||||
All of the types will be present in the result, with values of <code>true</code> if they are both selected to be removed
|
||||
and permitted to be removed, otherwise <code>false</code>.
|
||||
**/
|
||||
var dataToRemove : DataTypeSet;
|
||||
/**
|
||||
All of the types will be present in the result, with values of <code>true</code> if they are permitted to be removed (e.
|
||||
g., by enterprise policy) and <code>false</code> if not.
|
||||
**/
|
||||
var dataRemovalPermitted : DataTypeSet;
|
||||
};
|
46
externs/webextension_polyfill/browsingdata/Static.hx
Normal file
46
externs/webextension_polyfill/browsingdata/Static.hx
Normal file
@@ -0,0 +1,46 @@
|
||||
package webextension_polyfill.browsingdata;
|
||||
|
||||
typedef Static = {
|
||||
/**
|
||||
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.
|
||||
**/
|
||||
function settings():js.lib.Promise<SettingsCallbackResultType>;
|
||||
/**
|
||||
Clears various types of browsing data stored in a user's profile.
|
||||
**/
|
||||
function remove(options:RemovalOptions, dataToRemove:DataTypeSet):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears the browser's cache.
|
||||
**/
|
||||
function removeCache(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
|
||||
**/
|
||||
function removeCookies(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears the browser's list of downloaded files (<em>not</em> the downloaded files themselves).
|
||||
**/
|
||||
function removeDownloads(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears the browser's stored form data (autofill).
|
||||
**/
|
||||
function removeFormData(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears the browser's history.
|
||||
**/
|
||||
function removeHistory(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears websites' local storage data.
|
||||
**/
|
||||
function removeLocalStorage(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears plugins' data.
|
||||
**/
|
||||
function removePluginData(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Clears the browser's stored passwords.
|
||||
**/
|
||||
function removePasswords(options:RemovalOptions):js.lib.Promise<ts.Undefined>;
|
||||
};
|
Reference in New Issue
Block a user