add firefox extension template

This commit is contained in:
2025-08-07 16:03:16 -05:00
parent 6cbb29fed1
commit 5df289ffcb
586 changed files with 13636 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package webextension_polyfill.contextualidentities;
/**
Represents information about a contextual identity.
**/
typedef ContextualIdentity = {
/**
The name of the contextual identity.
**/
var name : String;
/**
The icon name of the contextual identity.
**/
var icon : String;
/**
The icon url of the contextual identity.
**/
var iconUrl : String;
/**
The color name of the contextual identity.
**/
var color : String;
/**
The color hash of the contextual identity.
**/
var colorCode : String;
/**
The cookie store ID of the contextual identity.
**/
var cookieStoreId : String;
};

View File

@@ -0,0 +1,19 @@
package webextension_polyfill.contextualidentities;
/**
Details about the contextual identity being created.
**/
typedef CreateDetailsType = {
/**
The name of the contextual identity.
**/
var name : String;
/**
The color of the contextual identity.
**/
var color : String;
/**
The icon of the contextual identity.
**/
var icon : String;
};

View File

@@ -0,0 +1,8 @@
package webextension_polyfill.contextualidentities;
typedef OnCreatedChangeInfoType = {
/**
Contextual identity that has been created
**/
var contextualIdentity : ContextualIdentity;
};

View File

@@ -0,0 +1,8 @@
package webextension_polyfill.contextualidentities;
typedef OnRemovedChangeInfoType = {
/**
Contextual identity that has been removed
**/
var contextualIdentity : ContextualIdentity;
};

View File

@@ -0,0 +1,8 @@
package webextension_polyfill.contextualidentities;
typedef OnUpdatedChangeInfoType = {
/**
Contextual identity that has been updated
**/
var contextualIdentity : ContextualIdentity;
};

View File

@@ -0,0 +1,13 @@
package webextension_polyfill.contextualidentities;
/**
Information to filter the contextual identities being retrieved.
**/
typedef QueryDetailsType = {
/**
Filters the contextual identity by name.
Optional.
**/
@:optional
var name : String;
};

View File

@@ -0,0 +1,36 @@
package webextension_polyfill.contextualidentities;
typedef Static = {
/**
Retrieves information about a single contextual identity.
**/
function get(cookieStoreId:String):js.lib.Promise<ContextualIdentity>;
/**
Retrieves all contextual identities
**/
function query(details:QueryDetailsType):js.lib.Promise<Array<ContextualIdentity>>;
/**
Creates a contextual identity with the given data.
**/
function create(details:CreateDetailsType):js.lib.Promise<ContextualIdentity>;
/**
Updates a contextual identity with the given data.
**/
function update(cookieStoreId:String, details:UpdateDetailsType):js.lib.Promise<ContextualIdentity>;
/**
Deletes a contetual identity by its cookie Store ID.
**/
function remove(cookieStoreId:String):js.lib.Promise<ContextualIdentity>;
/**
Fired when a container is updated.
**/
var onUpdated : webextension_polyfill.events.Event<(changeInfo:OnUpdatedChangeInfoType) -> Void>;
/**
Fired when a new container is created.
**/
var onCreated : webextension_polyfill.events.Event<(changeInfo:OnCreatedChangeInfoType) -> Void>;
/**
Fired when a container is removed.
**/
var onRemoved : webextension_polyfill.events.Event<(changeInfo:OnRemovedChangeInfoType) -> Void>;
};

View File

@@ -0,0 +1,25 @@
package webextension_polyfill.contextualidentities;
/**
Details about the contextual identity being created.
**/
typedef UpdateDetailsType = {
/**
The name of the contextual identity.
Optional.
**/
@:optional
var name : String;
/**
The color of the contextual identity.
Optional.
**/
@:optional
var color : String;
/**
The icon of the contextual identity.
Optional.
**/
@:optional
var icon : String;
};