241 lines
7 KiB
JSON
241 lines
7 KiB
JSON
[
|
|
{
|
|
"namespace": "manifest",
|
|
"types": [
|
|
{
|
|
"$extend": "PermissionNoPrompt",
|
|
"choices": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["contextualIdentities"]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"namespace": "contextualIdentities",
|
|
"description": "Use the <code>browser.contextualIdentities</code> API to query and modify contextual identity, also called as containers.",
|
|
"permissions": ["contextualIdentities"],
|
|
"types": [
|
|
{
|
|
"id": "ContextualIdentity",
|
|
"type": "object",
|
|
"description": "Represents information about a contextual identity.",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name of the contextual identity."
|
|
},
|
|
"icon": {
|
|
"type": "string",
|
|
"description": "The icon name of the contextual identity."
|
|
},
|
|
"iconUrl": {
|
|
"type": "string",
|
|
"description": "The icon url of the contextual identity."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "The color name of the contextual identity."
|
|
},
|
|
"colorCode": {
|
|
"type": "string",
|
|
"description": "The color hash of the contextual identity."
|
|
},
|
|
"cookieStoreId": {
|
|
"type": "string",
|
|
"description": "The cookie store ID of the contextual identity."
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"functions": [
|
|
{
|
|
"name": "get",
|
|
"type": "function",
|
|
"description": "Retrieves information about a single contextual identity.",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "cookieStoreId",
|
|
"description": "The ID of the contextual identity cookie store. "
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "query",
|
|
"type": "function",
|
|
"description": "Retrieves all contextual identities",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"type": "object",
|
|
"name": "details",
|
|
"description": "Information to filter the contextual identities being retrieved.",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"optional": true,
|
|
"description": "Filters the contextual identity by name."
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "create",
|
|
"type": "function",
|
|
"description": "Creates a contextual identity with the given data.",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"type": "object",
|
|
"name": "details",
|
|
"description": "Details about the contextual identity being created.",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"optional": false,
|
|
"description": "The name of the contextual identity."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"optional": false,
|
|
"description": "The color of the contextual identity."
|
|
},
|
|
"icon": {
|
|
"type": "string",
|
|
"optional": false,
|
|
"description": "The icon of the contextual identity."
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "update",
|
|
"type": "function",
|
|
"description": "Updates a contextual identity with the given data.",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "cookieStoreId",
|
|
"description": "The ID of the contextual identity cookie store. "
|
|
},
|
|
{
|
|
"type": "object",
|
|
"name": "details",
|
|
"description": "Details about the contextual identity being created.",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"optional": true,
|
|
"description": "The name of the contextual identity."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"optional": true,
|
|
"description": "The color of the contextual identity."
|
|
},
|
|
"icon": {
|
|
"type": "string",
|
|
"optional": true,
|
|
"description": "The icon of the contextual identity."
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "move",
|
|
"type": "function",
|
|
"description": "Reorder one or more contextual identities by their cookieStoreIDs to a given position.",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"name": "cookieStoreIds",
|
|
"description": "The ID or list of IDs of the contextual identity cookie stores. ",
|
|
"choices": [
|
|
{ "type": "string" },
|
|
{ "type": "array", "items": { "type": "string" } }
|
|
]
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "position",
|
|
"description": "The position the contextual identity should move to."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "remove",
|
|
"type": "function",
|
|
"description": "Deletes a contextual identity by its cookie Store ID.",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "cookieStoreId",
|
|
"description": "The ID of the contextual identity cookie store. "
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "onUpdated",
|
|
"type": "function",
|
|
"description": "Fired when a container is updated.",
|
|
"parameters": [
|
|
{
|
|
"type": "object",
|
|
"name": "changeInfo",
|
|
"properties": {
|
|
"contextualIdentity": {
|
|
"$ref": "ContextualIdentity",
|
|
"description": "Contextual identity that has been updated"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "onCreated",
|
|
"type": "function",
|
|
"description": "Fired when a new container is created.",
|
|
"parameters": [
|
|
{
|
|
"type": "object",
|
|
"name": "changeInfo",
|
|
"properties": {
|
|
"contextualIdentity": {
|
|
"$ref": "ContextualIdentity",
|
|
"description": "Contextual identity that has been created"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "onRemoved",
|
|
"type": "function",
|
|
"description": "Fired when a container is removed.",
|
|
"parameters": [
|
|
{
|
|
"type": "object",
|
|
"name": "changeInfo",
|
|
"properties": {
|
|
"contextualIdentity": {
|
|
"$ref": "ContextualIdentity",
|
|
"description": "Contextual identity that has been removed"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|