diff --git a/common/extensions/api/brave_rewards.json b/common/extensions/api/brave_rewards.json index d5dc04ccb75..4793f83c4a6 100644 --- a/common/extensions/api/brave_rewards.json +++ b/common/extensions/api/brave_rewards.json @@ -317,18 +317,17 @@ "name": "isSupported", "type": "function", "description": "Fetches whether or not Brave Rewards is supported", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "supported", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "supported", + "type": "boolean" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "recordNTPPanelTrigger", @@ -390,49 +389,49 @@ { "name": "publisherKey", "type": "string" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "integer" - }, - { - "name": "properties", - "type": "object", - "optional": true, - "properties": { - "publisherKey": { - "type": "string" - }, - "name": { - "type": "string" - }, - "percentage": { - "type": "number" - }, - "status": { - "type": "number" - }, - "excluded": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "favIconUrl": { - "type": "string" - } + } + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "integer" + }, + { + "name": "properties", + "type": "object", + "optional": true, + "properties": { + "publisherKey": { + "type": "string" + }, + "name": { + "type": "string" + }, + "percentage": { + "type": "number" + }, + "status": { + "type": "number" + }, + "excluded": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "favIconUrl": { + "type": "string" } } - ] - } - ] + } + ], + "does_not_support_promises": "Multi-parameter callback" + } }, { "name": "setPublisherIdForTab", @@ -457,53 +456,53 @@ { "name": "tabId", "type": "integer" - }, - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "publisher", - "type": "object", - "optional": true, - "properties": { - "percentage": { - "type": "integer", - "description": "publisher attention score" - }, - "excluded": { - "type": "boolean", - "description": "is site excluded from auto contribute" - }, - "provider": { - "type": "string", - "description": "provider (if media publisher) for this publisher" - }, - "favIconUrl": { - "type": "string", - "description": "publisher image url" - }, - "publisherKey": { - "type": "string", - "description": "publisher key, unique identifier" - }, - "name": { - "type": "string", - "description": "publisher name" - }, - "url": { - "type": "string", - "description": "url of the current tab" - }, - "status": { - "type": "integer", - "description": "publisher status" - } + } + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "publisher", + "type": "object", + "optional": true, + "properties": { + "percentage": { + "type": "integer", + "description": "publisher attention score" + }, + "excluded": { + "type": "boolean", + "description": "is site excluded from auto contribute" + }, + "provider": { + "type": "string", + "description": "provider (if media publisher) for this publisher" + }, + "favIconUrl": { + "type": "string", + "description": "publisher image url" + }, + "publisherKey": { + "type": "string", + "description": "publisher key, unique identifier" + }, + "name": { + "type": "string", + "description": "publisher name" + }, + "url": { + "type": "string", + "description": "url of the current tab" + }, + "status": { + "type": "integer", + "description": "publisher status" } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getPublisherPanelInfo", @@ -513,57 +512,57 @@ { "name": "publisherKey", "type": "string" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "integer" - }, - { - "name": "publisher", - "type": "object", - "optional": true, - "properties": { - "percentage": { - "type": "integer", - "description": "publisher attention score" - }, - "excluded": { - "type": "boolean", - "description": "is site excluded from auto contribute" - }, - "provider": { - "type": "string", - "description": "provider (if media publisher) for this publisher" - }, - "favIconUrl": { - "type": "string", - "description": "publisher image url" - }, - "publisherKey": { - "type": "string", - "description": "publisher key, unique identifier" - }, - "name": { - "type": "string", - "description": "publisher name" - }, - "url": { - "type": "string", - "description": "url of the current tab" - }, - "status": { - "type": "integer", - "description": "publisher status" - } + } + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "integer" + }, + { + "name": "publisher", + "type": "object", + "optional": true, + "properties": { + "percentage": { + "type": "integer", + "description": "publisher attention score" + }, + "excluded": { + "type": "boolean", + "description": "is site excluded from auto contribute" + }, + "provider": { + "type": "string", + "description": "provider (if media publisher) for this publisher" + }, + "favIconUrl": { + "type": "string", + "description": "publisher image url" + }, + "publisherKey": { + "type": "string", + "description": "publisher key, unique identifier" + }, + "name": { + "type": "string", + "description": "publisher name" + }, + "url": { + "type": "string", + "description": "url of the current tab" + }, + "status": { + "type": "integer", + "description": "publisher status" } } - ] - } - ] + } + ], + "does_not_support_promises": "Multi-parameter callback" + } }, { "name": "savePublisherInfo", @@ -593,18 +592,18 @@ { "name": "favIconUrl", "type": "string" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "integer" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "integer" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "tipSite", @@ -652,59 +651,58 @@ "name": "getRewardsParameters", "type": "function", "description": "Get default Rewards parameters", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "properties", - "type": "object", - "properties": { - "rate": { + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "properties", + "type": "object", + "properties": { + "rate": { + "type": "number", + "description": "conversion rate for BAT" + }, + "monthlyTipChoices": { + "type": "array", + "description": "default tip choices for monthly tips", + "items": { "type": "number", - "description": "conversion rate for BAT" - }, - "monthlyTipChoices": { - "type": "array", - "description": "default tip choices for monthly tips", - "items": { - "type": "number", - "minimum": 0 - } - }, - "autoContributeChoices": { - "type": "array", - "description": "A list of auto-contribute amount options", - "items": { - "type": "number", - "minimum": 0 - } - }, - "payoutStatus": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "walletProviderRegions": { - "type": "object", - "additionalProperties": { - "type": "any" - } - }, - "vbatDeadline": { - "type": "number", - "optional": true - }, - "vbatExpired": { - "type": "boolean" + "minimum": 0 } + }, + "autoContributeChoices": { + "type": "array", + "description": "A list of auto-contribute amount options", + "items": { + "type": "number", + "minimum": 0 + } + }, + "payoutStatus": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "walletProviderRegions": { + "type": "object", + "additionalProperties": { + "type": "any" + } + }, + "vbatDeadline": { + "type": "number", + "optional": true + }, + "vbatExpired": { + "type": "boolean" } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "createRewardsWallet", @@ -714,106 +712,101 @@ { "type": "string", "name": "country" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "type": "string", - "name": "result" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "type": "string", + "name": "result" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getAvailableCountries", "type": "function", "description": "", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "countries", - "type": "array", - "items": { - "type": "string" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "countries", + "type": "array", + "items": { + "type": "string" } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getDefaultCountry", "type": "function", "description": "", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "defaultCountry", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "defaultCountry", + "type": "string" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getDeclaredCountry", "type": "function", "description": "", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "country", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "country", + "type": "string" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getUserType", "type": "function", "description": "Returns the Rewards user type for the current user", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "userType", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "userType", + "type": "string" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getPublishersVisitedCount", "type": "function", "description": "Returns the number of publisher sites that a user has visited", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "count", - "type": "number" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "count", + "type": "number" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getBalanceReport", @@ -827,35 +820,35 @@ { "name": "year", "type": "number" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "properties", - "type": "object", - "properties": { - "ads": { - "type": "number" - }, - "contribute": { - "type": "number" - }, - "monthly": { - "type": "number" - }, - "grant": { - "type": "number" - }, - "tips": { - "type": "number" - } + } + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "properties", + "type": "object", + "properties": { + "ads": { + "type": "number" + }, + "contribute": { + "type": "number" + }, + "monthly": { + "type": "number" + }, + "grant": { + "type": "number" + }, + "tips": { + "type": "number" } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "includeInAutoContribution", @@ -876,21 +869,20 @@ "name": "fetchPromotions", "type": "function", "description": "Retrieves promotions (Rewards grants)", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "promotions", - "type": "array", - "items": { - "$ref": "Promotion" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "promotions", + "type": "array", + "items": { + "$ref": "Promotion" } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "claimPromotion", @@ -900,35 +892,35 @@ { "name": "promotionId", "type": "string" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "properties", - "type": "object", - "properties": { - "result": { - "type": "integer" - }, - "promotionId": { - "type": "string" - }, - "captchaId": { - "type": "string" - }, - "captchaImage": { - "type": "string" - }, - "hint": { - "type": "string" - } + } + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "properties", + "type": "object", + "properties": { + "result": { + "type": "integer" + }, + "promotionId": { + "type": "string" + }, + "captchaId": { + "type": "string" + }, + "captchaImage": { + "type": "string" + }, + "hint": { + "type": "string" } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "attestPromotion", @@ -942,73 +934,71 @@ { "name": "solution", "type": "string" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "integer" - }, - { - "name": "promotion", - "type": "object", - "properties": { - "promotionId": { - "type": "string" - }, - "expiresAt": { - "optional": true, - "type": "number" - }, - "amount": { - "optional": true, - "type": "number" - }, - "type": { - "optional": true, - "type": "integer" - } + } + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "integer" + }, + { + "name": "promotion", + "type": "object", + "properties": { + "promotionId": { + "type": "string" + }, + "expiresAt": { + "optional": true, + "type": "number" + }, + "amount": { + "optional": true, + "type": "number" + }, + "type": { + "optional": true, + "type": "integer" } } - ] - } - ] + } + ], + "does_not_support_promises": "Multi-parameter callback" + } }, { "name": "getRewardsEnabled", "type": "function", "description": "Gets a value indicating whether the user has opted-in to Rewards", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "enabled", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "enabled", + "type": "boolean" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getACEnabled", "type": "function", "description": "Gets whether auto contribute is enabled", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "enabled", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "enabled", + "type": "boolean" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "setAutoContributeEnabled", @@ -1051,18 +1041,17 @@ "name": "getRecurringTips", "type": "function", "description": "Gets list of sites with recurring tip data", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "tips", - "type": "any" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "tips", + "type": "any" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "refreshPublisher", @@ -1072,215 +1061,208 @@ { "name": "publisherKey", "type": "string" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "status", - "type": "integer" - }, - { - "name": "publisherKey", - "type": "string" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "status", + "type": "integer" + }, + { + "name": "publisherKey", + "type": "string" + } + ], + "does_not_support_promises": "Multi-parameter callback" + } }, { "name": "getAllNotifications", "type": "function", "description": "Gets all notifications", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "list", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "notification id" - }, - "type": { - "type": "integer", - "description": "notification type" - }, - "timestamp": { - "type": "number", - "description": "timestamp when notification was created" - }, - "args": { - "type": "array", - "description": "notification arguments, additional data", - "items": { - "type": "string" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "list", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "notification id" + }, + "type": { + "type": "integer", + "description": "notification type" + }, + "timestamp": { + "type": "number", + "description": "timestamp when notification was created" + }, + "args": { + "type": "array", + "description": "notification arguments, additional data", + "items": { + "type": "string" } } } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "fetchBalance", "type": "function", "description": "Fetch balance", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "balance", - "type": "number", - "optional": true - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "balance", + "type": "number", + "optional": true + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getExternalWalletProviders", "type": "function", "description": "Returns the supported external wallet providers for the current profile", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "providers", - "type": "array", - "items": { - "type": "string" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "providers", + "type": "array", + "items": { + "type": "string" } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getExternalWallet", "type": "function", "description": "Get external wallet for provided wallet type", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "wallet", - "type": "object", - "optional": true, - "properties": { - "type": { - "type": "string" - }, - "address": { - "type": "any" - }, - "status": { - "type": "any" - }, - "userName": { - "type": "any" - }, - "accountUrl": { - "type": "any" - }, - "activityUrl": { - "type": "string" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "wallet", + "type": "object", + "optional": true, + "properties": { + "type": { + "type": "string" + }, + "address": { + "type": "any" + }, + "status": { + "type": "any" + }, + "userName": { + "type": "any" + }, + "accountUrl": { + "type": "any" + }, + "activityUrl": { + "type": "string" } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getAdsAccountStatement", "type": "function", "description": "Get ads account statement", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "success", - "type": "boolean" - }, - { - "name": "adsAccountStatement", - "type": "object", - "optional": true, - "properties": { - "nextPaymentDate": { - "type": "number" - }, - "adsReceivedThisMonth": { - "type": "integer" - }, - "minEarningsThisMonth": { - "type": "number" - }, - "maxEarningsThisMonth": { - "type": "number" - }, - "minEarningsLastMonth": { - "type": "number" - }, - "maxEarningsLastMonth": { - "type": "number" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "success", + "type": "boolean" + }, + { + "name": "adsAccountStatement", + "type": "object", + "optional": true, + "properties": { + "nextPaymentDate": { + "type": "number" + }, + "adsReceivedThisMonth": { + "type": "integer" + }, + "minEarningsThisMonth": { + "type": "number" + }, + "maxEarningsThisMonth": { + "type": "number" + }, + "minEarningsLastMonth": { + "type": "number" + }, + "maxEarningsLastMonth": { + "type": "number" } } - ] - } - ] + } + ], + "does_not_support_promises": "Multi-parameter callback" + } }, { "name": "isInitialized", "type": "function", "description": "Is rewards engine initialized", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "initialized", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "initialized", + "type": "boolean" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "selfCustodyInviteDismissed", "type": "function", "description": "Returns a value indicating whether the self-custody invitation has been dismissed.", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "dismissed", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "dismissed", + "type": "boolean" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "dismissSelfCustodyInvite", @@ -1292,18 +1274,17 @@ "name": "isTermsOfServiceUpdateRequired", "type": "function", "description": "Returns a value indicating whether a Terms of Service update is required for the user.", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "updateRequired", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "updateRequired", + "type": "boolean" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "acceptTermsOfServiceUpdate", @@ -1315,26 +1296,25 @@ "name": "getScheduledCaptchaInfo", "type": "function", "description": "Gets all info required to retrieve a scheduled captcha (if any) for the user.", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "maxAttemptsExceeded": { - "type": "boolean" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "maxAttemptsExceeded": { + "type": "boolean" } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "updateScheduledCaptchaResult", @@ -1351,26 +1331,25 @@ "name": "getPrefs", "type": "function", "description": "Gets rewards preferences for the current profile", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "type": "object", - "name": "prefs", - "properties": { - "autoContributeEnabled": { - "type": "boolean" - }, - "autoContributeAmount": { - "type": "number" - } + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "type": "object", + "name": "prefs", + "properties": { + "autoContributeEnabled": { + "type": "boolean" + }, + "autoContributeAmount": { + "type": "number" } } - ] - } - ] + } + ] + }, + "does_not_support_promises": "Requires refactoring" } ] } diff --git a/common/extensions/api/brave_talk.json b/common/extensions/api/brave_talk.json index d70a80c2933..56e32c6dd8c 100644 --- a/common/extensions/api/brave_talk.json +++ b/common/extensions/api/brave_talk.json @@ -16,18 +16,17 @@ "name": "isSupported", "type": "function", "description": "Fetches whether or not Brave Talk is supported", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "supported", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "supported", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } } ], "types": [ diff --git a/common/extensions/api/brave_theme.json b/common/extensions/api/brave_theme.json index 6b596600c85..d9765c4980e 100644 --- a/common/extensions/api/brave_theme.json +++ b/common/extensions/api/brave_theme.json @@ -28,39 +28,35 @@ "name": "getBraveThemeList", "type": "function", "description": "Get available brave theme list", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called when brave theme list is fetched", - "parameters": [ - { - "name": "types", - "type": "string", - "description": "json stringified avalable theme list" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "types", + "type": "string", + "description": "json stringified available theme list" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "getBraveThemeType", "type": "function", "description": "Get current brave theme", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called when current brave theme is fetched", - "parameters": [ - { - "name": "type", - "type": "string", - "description": "current theme type (Dark or Light)" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "types", + "type": "string", + "description": "current theme type (Dark or Light)" + } + ] + }, + "does_not_support_promises": "Requires refactoring" }, { "name": "setBraveThemeType", diff --git a/common/extensions/api/brave_wallet.json b/common/extensions/api/brave_wallet.json index 75873ae4e74..a48998b7fa3 100644 --- a/common/extensions/api/brave_wallet.json +++ b/common/extensions/api/brave_wallet.json @@ -21,18 +21,16 @@ "name": "shouldPromptForSetup", "type": "function", "description": "Called to determine if a brave wallet prompt should be shown to opt into install", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "enabled", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "enabled", + "type": "boolean" + } + ] + } }, { "name": "notifyWalletUnlock", "type": "function", @@ -46,52 +44,45 @@ { "name": "key", "type": "binary" - }, { - "name": "seedCallback", - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "seed", - "type": "binary" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "seed", + "type": "binary" + } + ] + } }, { "name": "getProjectID", "type": "function", "description": "Called to get the configured infura project ID", - "parameters": [ - { - "name": "cb", - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "projectID", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "projectID", + "type": "string" + } + ] + } }, { "name": "getBraveKey", "type": "function", "description": "Called to get the Brave service key", - "parameters": [ - { - "name": "cb", - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "key", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "key", + "type": "string" + } + ] + } }, { "name": "resetWallet", "type": "function", @@ -101,66 +92,61 @@ "name": "getWeb3Provider", "type": "function", "description": "Called to get the configured web3 provider extension ID", - "parameters": [ - { - "name": "cb", - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "extensionID", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "extensionID", + "type": "string" + } + ] + } }, { "name": "getWeb3ProviderList", "type": "function", "description": "Get available web3 providers", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called when brave web3 provider list is fetched", - "parameters": [ - { - "name": "types", - "type": "string", - "description": "json stringified avalable web3 provider list" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "types", + "type": "string", + "description": "json stringified avalable web3 provider list" + } + ] + } }, { "name": "isNativeWalletEnabled", "type": "function", "description": "Determine if the native wallet is enabled", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called with a boolean indicating if the native wallet is enabled", - "parameters": [ - { - "name": "val", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "val", + "type": "boolean" + } + ] + } }, { "name": "loadUI", "type": "function", "description": "Called when brave://wallet WebUI wants to load the real UI", - "parameters": [ - { - "name": "cb", - "type": "function", - "name": "callback", - "parameters": [] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "cb", + "type": "function", + "name": "callback", + "parameters": [] + } + ] + } } ], "types": [ diff --git a/common/extensions/api/greaselion.json b/common/extensions/api/greaselion.json index 4958525d6fa..7d479c55dc6 100644 --- a/common/extensions/api/greaselion.json +++ b/common/extensions/api/greaselion.json @@ -19,18 +19,18 @@ "name": "id", "type": "string", "description": "The extension id to validate" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "valid", - "type": "boolean" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "valid", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } } ] } diff --git a/common/extensions/api/ipfs.json b/common/extensions/api/ipfs.json index f58f87ad50e..cebd0a9241a 100644 --- a/common/extensions/api/ipfs.json +++ b/common/extensions/api/ipfs.json @@ -16,39 +16,35 @@ "name": "getIpnsKeysList", "type": "function", "description": "Get list of available p2p keys", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called when keys list are fetched", - "parameters": [ - { - "name": "keys", - "type": "string", - "description": "json stringified avalable keys list" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "keys", + "type": "string", + "description": "json stringified avalable keys list" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "getIpfsPeersList", "type": "function", "description": "Get list of peers", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called when the peers list is fetched", - "parameters": [ - { - "name": "peers", - "type": "string", - "description": "json stringified avalable peers list" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "peers", + "type": "string", + "description": "json stringified avalable peers list" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "removeIpfsPeer", @@ -64,20 +60,19 @@ "name": "address", "type": "string", "description": "The address of a peer" - }, - { - "name": "callback", - "type": "function", - "description": "Function called when the peer is removed", - "parameters": [ - { - "name": "success", - "type": "boolean", - "description": "result of operation" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "success", + "type": "boolean", + "description": "result of operation" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "addIpfsPeer", @@ -88,20 +83,19 @@ "name": "value", "type": "string", "description": "The name of new peer" - }, - { - "name": "callback", - "type": "function", - "description": "Function called when peer is created", - "parameters": [ - { - "name": "success", - "type": "boolean", - "description": "result of config update operation" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "success", + "type": "boolean", + "description": "result of config update operation" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "addIpnsKey", @@ -112,20 +106,19 @@ "name": "name", "type": "string", "description": "The name of new key" - }, - { - "name": "callback", - "type": "function", - "description": "Function called when key is created", - "parameters": [ - { - "name": "result", - "type": "string", - "description": "json stringified created key information" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "string", + "description": "json stringified created key information" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "rotateKey", @@ -136,20 +129,19 @@ "name": "name", "type": "string", "description": "The name of oldkey key" - }, - { - "name": "callback", - "type": "function", - "description": "Function called when key is rotated", - "parameters": [ - { - "name": "result", - "type": "boolean", - "description": "json stringified created key information" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "boolean", + "description": "json stringified created key information" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "removeIpnsKey", @@ -160,140 +152,130 @@ "name": "name", "type": "string", "description": "The name of removed key" - }, - { - "name": "callback", - "type": "function", - "description": "Function called when key is removed", - "parameters": [ - { - "name": "result", - "type": "string", - "description": "removed key name" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "string", + "description": "removed key name" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "getResolveMethodList", "type": "function", "description": "Get methods for resolving IPFS URIs", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called when IPFS resolve methods list are fetched", - "parameters": [ - { - "name": "types", - "type": "string", - "description": "json stringified avalable IPFS resolve methods list" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "types", + "type": "string", + "description": "json stringified avalable IPFS resolve methods list" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "getIPFSEnabled", "type": "function", "description": "Get to see if the IPFS feature flag is enabled", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called with enabled status", - "parameters": [ - { - "name": "enabled", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "enabled", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "getResolveMethodType", "type": "function", "description": "Obtains the gateway setting for IPFS", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called with enabled status", - "parameters": [ - { - "name": "type", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "type", + "type": "string" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "launch", "type": "function", "description": "Called to launch the IPFS daemon", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "success", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "success", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "shutdown", "type": "function", "description": "Called to shutdown the IPFS daemon", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "success", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "success", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "getConfig", "type": "function", "description": "Called to get the IPFS config path", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "success", - "type": "boolean" - }, { - "name": "path", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "success", + "type": "boolean" + }, + { + "name": "path", + "type": "string" + } + ], + "does_not_support_promises": "Multi-parameter callback" + } }, { "name": "getExecutableAvailable", "type": "function", "description": "Called to determine if a local node is installed", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "available", - "type": "boolean" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "available", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "resolveIPFSURI", "type": "function", @@ -302,17 +284,18 @@ { "type": "string", "name": "uri" - }, { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "gateway", - "type": "string" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "gateway", + "type": "string" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "validateGatewayUrl", @@ -323,37 +306,34 @@ "name": "url", "type": "string", "description": "The url to validate" - }, - { - "name": "callback", - "type": "function", - "description": "Function called when url is validated", - "parameters": [ - { - "name": "result", - "type": "boolean", - "description": "True if gateway is valid otherwise false" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "result", + "type": "boolean", + "description": "True if gateway is valid otherwise false" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "getSettings", "type": "function", "description": "Returns list of ipfs settings", - "parameters": [ - { - "name": "callback", - "type": "function", - "description": "Function called with settings list", - "parameters": [ - { - "name": "settings", - "type": "string" - } - ] - } - ] + "parameters": [], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "settings", + "type": "string" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "setResolveMethod", "type": "function", @@ -363,19 +343,18 @@ "name": "resolve_method", "type": "string", "description": "ask/disabled/gateway/local" - }, - { - "name": "callback", - "type": "function", - "description": "Function called with status", - "parameters": [ - { - "name": "status", - "type": "boolean" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "status", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "setPublicGateway", "type": "function", @@ -385,42 +364,40 @@ "name": "url", "type": "string", "description": "Public gateway url" - }, - { - "name": "callback", - "type": "function", - "description": "Function called with status", - "parameters": [ - { - "name": "status", - "type": "boolean" - } - ] } - ] - }, { - "name": "setPublicNFTGateway", - "type": "function", - "description": "Sets public NFT gateway value", - "parameters": [ - { - "name": "url", - "type": "string", - "description": "Public NFT gateway url" - }, - { + ], + "returns_async": { "name": "callback", - "type": "function", - "description": "Function called with status", "parameters": [ { "name": "status", "type": "boolean" } - ] + ], + "does_not_support_promises": "Requires refactoring" } - ] - }, { + }, { + "name": "setPublicNFTGateway", + "type": "function", + "description": "Sets public NFT gateway value", + "parameters": [ + { + "name": "url", + "type": "string", + "description": "Public NFT gateway url" + } + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "status", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } + }, { "name": "setAutoRedirectToConfiguredGatewayEnabled", "type": "function", "description": "Sets whether IPFS resouceces should be forwarded to the configured gateway", @@ -429,19 +406,18 @@ "name": "value", "type": "boolean", "description": "value" - }, - { - "name": "callback", - "type": "function", - "description": "Function called with status", - "parameters": [ - { - "name": "status", - "type": "boolean" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "status", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } }, { "name": "setGatewayFallbackEnabled", "type": "function", @@ -451,19 +427,18 @@ "name": "value", "type": "boolean", "description": "value" - }, - { - "name": "callback", - "type": "function", - "description": "Function called with status", - "parameters": [ - { - "name": "status", - "type": "boolean" - } - ] } - ] + ], + "returns_async": { + "name": "callback", + "parameters": [ + { + "name": "status", + "type": "boolean" + } + ], + "does_not_support_promises": "Requires refactoring" + } } ], "types": [